Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/LayoutTests/usb/resources/open-in-iframe.html

Issue 2789723003: Migrate WebUSB LayoutTests into external/wpt (Closed)
Patch Set: Add README.md and more comments explaining the polyfill Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script>
3 'use strict';
4 window.onmessage = messageEvent => {
5 if (messageEvent.data === 'Ready') {
6 navigator.usb.addEventListener('connect', connectEvent => {
7 connectEvent.device.open().then(() => {
8 parent.postMessage('Success', '*');
9 }).catch(error => {
10 console.log(error);
11 parent.postMessage('FAIL: open rejected ' + error, '*');
12 });
13 });
14 parent.postMessage('Ready', '*');
15 }
16 };
17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698