mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
20 lines
412 B
JavaScript
20 lines
412 B
JavaScript
// META: script=/resources/WebIDLParser.js
|
|
// META: script=/resources/idlharness.js
|
|
|
|
// https://w3c.github.io/battery/
|
|
|
|
'use strict';
|
|
|
|
idl_test(
|
|
['battery'],
|
|
['dom', 'html'],
|
|
async idl_array => {
|
|
idl_array.add_objects({
|
|
Navigator: ['navigator'],
|
|
BatteryManager: ['manager'],
|
|
})
|
|
|
|
self.manager = await navigator.getBattery();
|
|
},
|
|
'Test IDL implementation of Battery Status API'
|
|
);
|