chore: initial linting fixes for JS in docs/fiddles (#37689)
This commit is contained in:
parent
be32740991
commit
db27b9f433
45 changed files with 122 additions and 134 deletions
|
|
@ -1,11 +1,11 @@
|
|||
async function testIt() {
|
||||
async function testIt () {
|
||||
const filters = [
|
||||
{ usbVendorId: 0x2341, usbProductId: 0x0043 },
|
||||
{ usbVendorId: 0x2341, usbProductId: 0x0001 }
|
||||
];
|
||||
]
|
||||
try {
|
||||
const port = await navigator.serial.requestPort({filters});
|
||||
const portInfo = port.getInfo();
|
||||
const port = await navigator.serial.requestPort({ filters })
|
||||
const portInfo = port.getInfo()
|
||||
document.getElementById('device-name').innerHTML = `vendorId: ${portInfo.usbVendorId} | productId: ${portInfo.usbProductId} `
|
||||
} catch (ex) {
|
||||
if (ex.name === 'NotFoundError') {
|
||||
|
|
@ -16,4 +16,4 @@ async function testIt() {
|
|||
}
|
||||
}
|
||||
|
||||
document.getElementById('clickme').addEventListener('click',testIt)
|
||||
document.getElementById('clickme').addEventListener('click', testIt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue