Skip to content

Commit

Permalink
Update griffin powermate demo
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Apr 11, 2017
1 parent 3b1610f commit c80f984
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webusb/griffin-powermate.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<script>
var device;

log.textContent = ('usb' in navigator) ? '' : 'Please enable WebUSB first.';

document.querySelector('button').addEventListener('click', connect);

async function connect() {
Expand All @@ -21,7 +23,7 @@
log.textContent = device.productName + ' connected';
await watch();
} catch(e) {
console.log(e);
log.textContent = 'Argh! ' + e;
}
}

Expand All @@ -34,7 +36,7 @@

watch();
} catch(e) {
console.log(e);
log.textContent = 'Argh! ' + e;
}
}

Expand Down

0 comments on commit c80f984

Please sign in to comment.