HTMLBluetoothElement.open()
WebComponentHTMLBluetoothElementopenLess than 1 minute
Opens the bluetooth device; internally calls the BluetoothPlugin.open() method
HTMLBluetoothElement.open()
Parameters
- None
Return Value
Returns a Promise that resolves to a BluetoohOpenResponse object
Example
<body>
<dweb-bluetooth></dweb-bluetooth>
<button>open</button>
<script type="module">
import "@plaoc/plugins"
const bluetooth = document.querySelector("dweb-bluetooth")!
const btn = document.querySelector('button');
btn.addEventListener('click', async () => {
const res = await bluetooth.open();
})
</script>
</body>
Platform Compatibility
Properties/Methods/Events | Android | iOS | Desktop-Dev | Desktop |
---|---|---|---|---|
open | ✅ | ✅ | ✅ | X |
Related Links
Powered by Waline v2.15.7