Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /requestidlecallback/idlharness.window.html - WPT Dashboard Interop Dashboard
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
'use strict';
idl_test(
['requestidlecallback'],
['html', 'dom'],
async idl_array => {
idl_array.add_objects({
IdleDeadline: ['deadline'],
Window: ['window'],
});
await new Promise(resolve => {
requestIdleCallback(d => {
self.deadline = d;
resolve();
}, { timeout: 100 });
});
}
);