mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Rename WebIDL.idl to webidl.idl (#31241) This rename has happened in @webref/idl 2.7.0: https://github.com/web-platform-tests/wpt/pull/31237 Tests need to be adapted, so do this rename manually. -- wpt-commits: 7e8c07686a91ee9b7f211209afb7830546f134d8 wpt-pr: 31241
24 lines
494 B
JavaScript
24 lines
494 B
JavaScript
// META: script=/resources/WebIDLParser.js
|
|
// META: script=/resources/idlharness.js
|
|
|
|
// https://w3c.github.io/sensors/
|
|
|
|
'use strict';
|
|
|
|
function cast(i, t) {
|
|
return Object.assign(Object.create(t.prototype), i);
|
|
}
|
|
|
|
idl_test(
|
|
['generic-sensor'],
|
|
['dom', 'html', 'webidl'],
|
|
idl_array => {
|
|
idl_array.add_objects({
|
|
Sensor: ['cast(new Accelerometer(), Sensor)'],
|
|
SensorErrorEvent: [
|
|
'new SensorErrorEvent("error", { error: new DOMException });'
|
|
],
|
|
});
|
|
}
|
|
);
|