padConnect
Connects the Wizard control to an STU signature pad. The pad is accessed through WebHID, so the browser must support WebHID and the page must run in a secure context.
await wizCtl.padConnect(stuDevice)
| Parameter | Description |
|---|---|
| stuDevice | A sigSDK.STUDevice object for the pad to connect to. |
| Return values |
|---|
| A promise that resolves when the pad is connected. |
The following example checks for WebHID support, asks the user to select a pad and connects to it:
if (sigSDK.STUDevice.isHIDSupported()) {
const devices = await sigSDK.STUDevice.requestDevices();
if (devices.length > 0) {
const stuDevice = new sigSDK.STUDevice(devices[0]);
await wizCtl.padConnect(stuDevice);
}
}
note
STUDevice.requestDevices() opens the browser's device picker.
Browsers only allow this in response to a user action, such as a button click.