mirror of
https://github.com/servo/servo.git
synced 2025-07-02 13:03:43 +01:00
24 lines
734 B
JavaScript
24 lines
734 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) {
|
|
idl_array.add_objects({
|
|
ServiceWorkerGlobalScope: ['self', 'onsync', 'onperiodicsync'],
|
|
ServiceWorkerRegistration: ['registration'],
|
|
SyncManager: ['registration.sync'],
|
|
PeriodicSyncManager: ['registration.periodicSync'],
|
|
SyncEevnt: ['new SyncEvent("tag", "lastChance")'],
|
|
PeriodicSyncEevnt: ['new PeriodicSyncEvent("tag")'],
|
|
});
|
|
}
|
|
}
|
|
);
|