mirror of
https://github.com/servo/servo.git
synced 2025-06-26 01:54:33 +01:00
23 lines
494 B
JavaScript
23 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 });'
|
|
],
|
|
});
|
|
}
|
|
);
|