idlharness.https.window.js (494B)
1 // META: script=/resources/WebIDLParser.js 2 // META: script=/resources/idlharness.js 3 4 // https://w3c.github.io/sensors/ 5 6 'use strict'; 7 8 function cast(i, t) { 9 return Object.assign(Object.create(t.prototype), i); 10 } 11 12 idl_test( 13 ['generic-sensor'], 14 ['dom', 'html', 'webidl'], 15 idl_array => { 16 idl_array.add_objects({ 17 Sensor: ['cast(new Accelerometer(), Sensor)'], 18 SensorErrorEvent: [ 19 'new SensorErrorEvent("error", { error: new DOMException });' 20 ], 21 }); 22 } 23 );