mirror of
https://github.com/servo/servo.git
synced 2025-10-16 16:29:18 +01:00
22 lines
594 B
JavaScript
22 lines
594 B
JavaScript
// META: script=/resources/WebIDLParser.js
|
|
// META: script=/resources/idlharness.js
|
|
|
|
'use strict';
|
|
|
|
// https://wicg.github.io/BackgroundSync/spec/
|
|
|
|
idl_test(
|
|
['BackgroundSync'],
|
|
['service-workers', 'html', 'dom'],
|
|
idlArray => {
|
|
const isServiceWorker = location.pathname.includes('.serviceworker.');
|
|
if (isServiceWorker) {
|
|
idlArray.add_objects({
|
|
ServiceWorkerGlobalScope: ['self', 'onsync'],
|
|
ServiceWorkerRegistration: ['registration'],
|
|
SyncManager: ['registration.sync'],
|
|
SyncEvent: ['new SyncEvent("tag", "lastChance")'],
|
|
});
|
|
}
|
|
}
|
|
);
|