DeviceRequestPrompt.waitForDevice() 方法
¥DeviceRequestPrompt.waitForDevice() method
解析提示中与过滤器匹配的第一个设备。
¥Resolve to the first device in the prompt matching a filter.
签名
¥Signature
class DeviceRequestPrompt {
waitForDevice(
filter: (device: DeviceRequestPromptDevice) => boolean,
options?: WaitTimeoutOptions,
): Promise<DeviceRequestPromptDevice>;
}
参数
¥Parameters
范围 | 类型 | 描述 |
---|---|---|
filter | (设备:DeviceRequestPromptDevice)=>布尔值 | |
options | (可选的) |
Returns:
Promise<DeviceRequestPromptDevice>