-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5e6498e
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Proposed WebIDL | ||
|
||
## Definition of the interface | ||
```webidl | ||
partial interface ServiceWorkerRegistration { | ||
readonly attribute PeriodicSyncManager periodicSync; | ||
}; | ||
[SecureContext, Exposed=(Window,Worker)] | ||
interface PeriodicSyncManager { | ||
Promise<void> register(DOMString tag, BackgroundSyncOptions options); | ||
Promise<void> unregister(DOMString tag); | ||
Promise<sequence<DOMString>> getTags(); | ||
}; | ||
``` | ||
|
||
## Definition of the Service Worker event | ||
```webidl | ||
partial interface ServiceWorkerGlobalScope { | ||
attribute EventHandler onperiodicsync; | ||
}; | ||
[Constructor(DOMString type, PeriodicSyncEventInit init), Exposed=ServiceWorker] | ||
interface SyncEvent : ExtendableEvent { | ||
readonly attribute DOMString tag; | ||
}; | ||
dictionary PeriodicSyncEventInit : ExtendableEventInit { | ||
required DOMString tag; | ||
}; | ||
``` | ||
|
||
## Extensions to the Background Sync API | ||
```webidl | ||
dictionary BackgroundSyncOptions { | ||
// …existing properties… | ||
unsigned long long minInterval; | ||
}; | ||
``` |