Skip to content

Commit

Permalink
Add BackgroundSync idl file
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Bjerring committed Mar 2, 2018
1 parent 26cd868 commit 8d14ed0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions interfaces/BackgroundSync.idl
@@ -0,0 +1,24 @@
partial interface ServiceWorkerRegistration {
readonly attribute SyncManager sync;
};

[Exposed=(Window,Worker)]
interface SyncManager {
Promise<void> register(DOMString tag);
Promise<sequence<DOMString>> getTags();
};

partial interface ServiceWorkerGlobalScope {
attribute EventHandler onsync;
};

[Constructor(DOMString type, SyncEventInit init), Exposed=ServiceWorker]
interface SyncEvent : ExtendableEvent {
readonly attribute DOMString tag;
readonly attribute boolean lastChance;
};

dictionary SyncEventInit : ExtendableEventInit {
required DOMString tag;
boolean lastChance = false;
};

0 comments on commit 8d14ed0

Please sign in to comment.