Index: modules/serviceworkers/ServiceWorkerGlobalScope.idl |
diff --git a/modules/serviceworkers/ServiceWorkerGlobalScope.idl b/modules/serviceworkers/ServiceWorkerGlobalScope.idl |
index 10d9a9b052911823427667cb81c3b67cd9c19375..2319e5b5b87d62533ba13614881707613fb8dac7 100644 |
--- a/modules/serviceworkers/ServiceWorkerGlobalScope.idl |
+++ b/modules/serviceworkers/ServiceWorkerGlobalScope.idl |
@@ -29,24 +29,28 @@ |
*/ |
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-global-scope-interface |
+ |
[ |
Exposed=ServiceWorker, |
Global=(Worker,ServiceWorker), |
- RuntimeEnabled=ServiceWorker, |
+ TypeChecking=Interface, |
] interface ServiceWorkerGlobalScope : WorkerGlobalScope { |
- readonly attribute ServiceWorkerClients clients; |
- [CallWith=ExecutionContext, Unforgeable] readonly attribute ScalarValueString scope; |
- [CallWith=ExecutionContext, Unforgeable, RuntimeEnabled=ServiceWorkerOnFetch] readonly attribute CacheStorage caches; |
+ readonly attribute Clients clients; |
+ readonly attribute ServiceWorkerRegistration registration; |
+ |
+ // https://github.com/mkruisselbrink/navigator-connect/blob/gh-pages/docs/api-idea.md#persisted-messageports |
+ // TODO(mek): Link to actual spec when this is added there, and decide if this is the right place for this. |
+ [RuntimeEnabled=NavigatorConnect] readonly attribute StashedPortCollection ports; |
- [CallWith=ScriptState] Promise fetch(DOMString request, optional Dictionary requestInitDict); |
- [CallWith=ScriptState] Promise fetch(Request request, optional Dictionary requestInitDict); |
+ [CallWith=ScriptState, RaisesException] Promise<Response> fetch(RequestInfo input, optional Dictionary init); |
[RaisesException] void close(); |
+ [CallWith=ScriptState] Promise<void> skipWaiting(); |
+ |
attribute EventHandler onactivate; |
- [RuntimeEnabled=ServiceWorkerOnFetch] attribute EventHandler onfetch; |
+ attribute EventHandler onfetch; |
attribute EventHandler oninstall; |
attribute EventHandler onmessage; |
- [RuntimeEnabled=BackgroundSync] attribute EventHandler onsync; |
}; |