HTMLDwebBarcodeScanningElement.startScanning()
WebComponentHTMLDwebBarcodeScanningElementstartScanningLess than 1 minute
Starts barcode scanning
HTMLDwebBarcodeScanningElement.startScanning()
Parameters
- None
Return Value
Returns a Promise that resolves to a ScanResult object
Example
<body>
<dweb-barcode-scanning></dweb-barcode-scanning>
<button>scanner</button>
<script type="module">
import "@plaoc/plugins"
const barcodeScanner = document.querySelector("dweb-barcode-scanning")!
const btn = document.querySelector('button');
btn.addEventListener('click', async () => {
const res = await barcodeScanner.startScanning();
})
</script>
</body>
Platform Compatibility
Properties/Methods/Events | Android | iOS | Desktop-Dev | Desktop |
---|---|---|---|---|
startScanning | ✅ | ✅ | ✅ | X |
Related Links
Powered by Waline v2.15.7