@@ -522,13 +522,8 @@ specified) run these steps:
522
522
<li><p> If one of <var> notification</var> 's <a for=notification>actions</a> was activated by the
523
523
user, then set <var> action</var> to that <a for=notification>action</a> 's <a for=action>name</a> .
524
524
525
- <li><p> Let <var> callback</var> be an algorithm that when invoked with a <var> global</var> ,
526
- <a lt="fire a service worker notification event named e">fires a service worker notification event</a>
527
- named <code> notificationclick</code> given <var> notification</var> and <var> action</var> on
528
- <var> global</var> .
529
-
530
- <li><p> Then run <a>Handle Functional Event</a> with <var> notification</var> 's
531
- <a for=notification>service worker registration</a> and <var> callback</var> .
525
+ <li> <a>Fire a service worker notification event</a> named "<code> notificationclick</code> " given
526
+ <var> notification</var> and <var> action</var> .
532
527
</ol>
533
528
534
529
<li>
@@ -571,18 +566,9 @@ must be run.
571
566
<p> To <dfn>handle close events</dfn> given a <var> notification</var> , run these steps:
572
567
573
568
<ol>
574
- <li>
575
- <p> If <var> notification</var> is a <a>persistent notification</a> and
576
- <var> notification</var> was closed by the user, then:
577
-
578
- <ol>
579
- <li><p> Let <var> callback</var> be an algorithm that when invoked with a <var> global</var> ,
580
- <a lt="fire a service worker notification event named e">fires a service worker notification event</a>
581
- named <code> notificationclose</code> given <var> notification</var> on <var> global</var> .
582
-
583
- <li><p> Then run <a>Handle Functional Event</a> with <var> notification</var> 's
584
- <a for=notification>service worker registration</a> and <var> callback</var> .
585
- </ol>
569
+ <li><p> If <var> notification</var> is a <a>persistent notification</a> and <var> notification</var>
570
+ was closed by the user, then <a>fire a service worker notification event</a> named
571
+ "<code> notificationclose</code> " given <var> notification</var> .
586
572
587
573
<li><p> If <var> notification</var> is a <a>non-persistent notification</a> , then <a>queue a task</a>
588
574
to <a>fire an event</a> named <code> close</code> on the {{Notification}} object representing
@@ -1083,13 +1069,18 @@ the same underlying <a>notification</a> of {{Notification}} objects already in e
1083
1069
1084
1070
<hr>
1085
1071
1086
- <p> To <dfn>fire a service worker notification event named <var>e</var></dfn>
1087
- given <var> notification</var> and <var> action</var> ,
1088
- <a>fire an event</a> named <var> e</var> , using {{NotificationEvent}} , with the
1089
- {{NotificationEvent/notification}} attribute initialized to a new
1090
- {{Notification}} object representing <var> notification</var> and the
1091
- {{NotificationEvent/action}} attribute initialized to <var> action</var> .
1092
- <!-- XXX need to define at what the event is fired -->
1072
+ <p> To <dfn>fire a service worker notification event</dfn> named <var> name</var> given
1073
+ <var> notification</var> (a <a>notification</a> ), and an optional <var> action</var> (a DOMString,
1074
+ defaulting to the empty string), <a>Fire Functional Event</a> <var> name</var> using
1075
+ {{NotificationEvent}} on <var> notification</var> 's
1076
+ <a for=notification>service worker registration</a> with the following properties:
1077
+
1078
+ <dl>
1079
+ <dt> {{NotificationEvent/notification}}
1080
+ <dd> A new {{Notification}} object representing <var> notification</var> .
1081
+ <dt> {{NotificationEvent/action}}
1082
+ <dd><var> action</var>
1083
+ </dl>
1093
1084
1094
1085
<p> The {{NotificationEvent/notification}} attribute's getter must return the
1095
1086
value it was initialized to.
@@ -1165,8 +1156,6 @@ by John Gregg (<a href=https://www.google.com/>Google</a>,
1165
1156
urlPrefix: https://html.spec.whatwg.org/multipage/
1166
1157
urlPrefix: webappapis.html; type: dfn
1167
1158
text: entry settings object
1168
- urlPrefix: https://w3c.github.io/ServiceWorker/; type: dfn
1169
- text: handle functional event; url:handle-functional-event-algorithm
1170
1159
urlPrefix: https://w3c.github.io/vibration/
1171
1160
urlPrefix: #dfn-; type: dfn
1172
1161
text: perform vibration
0 commit comments