https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7d92dbd58ac296da6fb2e24d9c9758775e873088 authored by Mike West on 06 December 2018, 10:19:53 UTC
Trusted Types: URLs should be USVString, not DOMString.
Tip revision: 7d92dbd
idlharness.https.window.js
// 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 });'
      ],
    });
  }
);
back to top