@@ -1529,6 +1533,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
Event name |
Interface |
+ Category |
Dispatched when… |
@@ -1536,26 +1541,67 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
install |
{{ExtendableEvent}} |
- [Lifecycle event] The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's installing worker changes. (See step 11.2 of the Install algorithm.) |
+ [=Lifecycle Event|Lifecycle=] |
+ The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's installing worker changes. (See step 11.2 of the Install algorithm.) |
activate |
{{ExtendableEvent}} |
- [Lifecycle event] The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's active worker changes. (See step 12.2 of the Activate algorithm.) |
+ [=Lifecycle Event|Lifecycle=] |
+ The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's active worker changes. (See step 12.2 of the Activate algorithm.) |
fetch |
{{FetchEvent}} |
- [Functional event] The [=/http fetch=] invokes Handle Fetch with |request|. As a result of performing Handle Fetch, the [=ServiceWorkerGlobalScope/service worker=] returns a [=/response=] to the [=/http fetch=]. The [=/response=], represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{WindowOrWorkerGlobalScope/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.) |
+ [=Functional event|Functional=] |
+ The [=/http fetch=] invokes Handle Fetch with |request|. As a result of performing Handle Fetch, the [=ServiceWorkerGlobalScope/service worker=] returns a [=/response=] to the [=/http fetch=]. The [=/response=], represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{WindowOrWorkerGlobalScope/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.) |
+
+
+ push |
+ PushEvent |
+ [=Functional event|Functional=] |
+ (See Firing a push event.) |
+
+
+ notificationclick |
+ NotificationEvent |
+ [=Functional event|Functional=] |
+ (See Activating a notification.) |
+
+
+ notificationclose |
+ NotificationEvent |
+ [=Functional event|Functional=] |
+ (See Closing a notification.) |
+
+
+ sync |
+ SyncEvent |
+ [=Functional event|Functional=] |
+ (See Firing a sync event.) |
+
+
+ canmakepayment |
+ CanMakePaymentEvent |
+ [=Functional event|Functional=] |
+ (See Handling a CanMakePaymentEvent.) |
+
+
+ paymentrequest |
+ PaymentRequestEvent |
+ [=Functional event|Functional=] |
+ (See Handling a PaymentRequestEvent.) |
message |
{{ExtendableMessageEvent}} |
+ Legacy |
When it receives a message. |
messageerror |
{{MessageEvent}} |
+ Legacy |
When it was sent a message that cannot be deserialized. |
@@ -2055,7 +2101,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
Extensibility
- [=/Service workers=] are extensible from other specifications.
+ Service Workers specification is extensible from other specifications.
Define API bound to Service Worker Registration
diff --git a/docs/v1/index.bs b/docs/v1/index.bs
index 986ba63f..f9d46c61 100644
--- a/docs/v1/index.bs
+++ b/docs/v1/index.bs
@@ -146,8 +146,6 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
A [=/service worker=] has an associated global object (a {{ServiceWorkerGlobalScope}} object or null).
- A [=/service worker=] has lifecycle events, {{install!!event}} and {{activate!!event}}, and functional events including {{fetch!!event}}, which target the {{ServiceWorkerGlobalScope}}.
-
A [=/service worker=] has an associated script resource (a script), which represents its own script resource. It is initially set to null.
A script resource has an associated has ever been evaluated flag. It is initially unset.
@@ -176,6 +174,12 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
* Has no event to handle.
* Detects abnormal operation: such as infinite loops and tasks exceeding imposed time limits (if any) while handling the events.
+
+
+ Events
+
+ Service Workers specification defines lifecycle events (each of which is an [=event=]), {{install!!event}} and {{activate!!event}}. Service Workers and other specifications that extend Service Workers define set of events called functional events (each of which is an [=event=]) including {{fetch!!event}}. (See the list of [=lifecycle events=] and [=functional events=].)
+
@@ -1455,6 +1459,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
Event name |
Interface |
+ Category |
Dispatched when… |
@@ -1462,26 +1467,67 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
install |
{{ExtendableEvent}} |
- [Lifecycle event] The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's installing worker changes. (See step 11.2 of the Install algorithm.) |
+ [=Lifecycle Event|Lifecycle=] |
+ The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's installing worker changes. (See step 11.2 of the Install algorithm.) |
activate |
{{ExtendableEvent}} |
- [Lifecycle event] The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's active worker changes. (See step 12.2 of the Activate algorithm.) |
+ [=Lifecycle Event|Lifecycle=] |
+ The [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration's active worker changes. (See step 12.2 of the Activate algorithm.) |
fetch |
{{FetchEvent}} |
- [Functional event] The [=/http fetch=] invokes Handle Fetch with |request|. As a result of performing Handle Fetch, the [=ServiceWorkerGlobalScope/service worker=] returns a [=/response=] to the [=/http fetch=]. The [=/response=], represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{WindowOrWorkerGlobalScope/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.) |
+ [=Functional event|Functional=] |
+ The [=/http fetch=] invokes Handle Fetch with |request|. As a result of performing Handle Fetch, the [=ServiceWorkerGlobalScope/service worker=] returns a [=/response=] to the [=/http fetch=]. The [=/response=], represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{WindowOrWorkerGlobalScope/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.) |
+
+
+ push |
+ PushEvent |
+ [=Functional event|Functional=] |
+ (See Firing a push event.) |
+
+
+ notificationclick |
+ NotificationEvent |
+ [=Functional event|Functional=] |
+ (See Activating a notification.) |
+
+
+ notificationclose |
+ NotificationEvent |
+ [=Functional event|Functional=] |
+ (See Closing a notification.) |
+
+
+ sync |
+ SyncEvent |
+ [=Functional event|Functional=] |
+ (See Firing a sync event.) |
+
+
+ canmakepayment |
+ CanMakePaymentEvent |
+ [=Functional event|Functional=] |
+ (See Handling a CanMakePaymentEvent.) |
+
+
+ paymentrequest |
+ PaymentRequestEvent |
+ [=Functional event|Functional=] |
+ (See Handling a PaymentRequestEvent.) |
message |
{{ExtendableMessageEvent}} |
+ Legacy |
When it receives a message. |
messageerror |
{{MessageEvent}} |
+ Legacy |
When it was sent a message that cannot be deserialized. |
@@ -1982,7 +2028,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
Extensibility
- [=/Service workers=] are extensible from other specifications.
+ Service Workers specification is extensible from other specifications.
Define API bound to Service Worker Registration