Automatic update from web-platform-tests WebHID: Add support for dedicated workers This CL exposes the WebHID API to dedicated workers behind the blink runtime feature WebHIDOnDedicatedWorkers. Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/y__BOYfZWzI Spec PR: https://github.com/WICG/webhid/pull/121 Spec issue: https://github.com/WICG/webhid/issues/120 Demo: https://webhid-worker.glitch.me/ Change-Id: If145f34faf9211a54c8b4a15fbe7e903411b8d1d Bug: 365932453 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5841991 Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Yoav Weiss (@Shopify) <yoavweiss@chromium.org> Reviewed-by: Matt Reynolds <mattreynolds@chromium.org> Commit-Queue: Fr <beaufort.francois@gmail.com> Cr-Commit-Position: refs/heads/main@{#1357046} -- wpt-commits: f3a05bb7fe21b6e6d8fbf5923d53abfc7c04fd66 wpt-pr: 48244
26 lines
568 B
JavaScript
26 lines
568 B
JavaScript
// META: script=/resources/WebIDLParser.js
|
|
// META: script=/resources/idlharness.js
|
|
|
|
'use strict';
|
|
|
|
// https://wicg.github.io/webhid/
|
|
|
|
idl_test(
|
|
['webhid'],
|
|
['html', 'dom'],
|
|
idl_array => {
|
|
if (self.GLOBAL.isWindow()) {
|
|
idl_array.add_objects({ Navigator: ['navigator'] });
|
|
} else if (self.GLOBAL.isWorker()) {
|
|
idl_array.add_objects({ WorkerNavigator: ['navigator'] });
|
|
}
|
|
|
|
idl_array.add_objects({
|
|
HID: ['navigator.hid'],
|
|
// TODO: HIDConnectionEvent
|
|
// TODO: HIDInputReportEvent
|
|
// TODO: HIDDevice
|
|
});
|
|
}
|
|
);
|