@@ -48,9 +48,6 @@ representation of something that happened, such as the delivery of a message.
48
48
<p> A <a>notification</a> has an associated
49
49
<dfn for=notification id=concept-title>title</dfn> which is a string.
50
50
51
- <p> A <a>notification</a> has an associated
52
- <dfn for=notification id=body>body</dfn> which is a string.
53
-
54
51
<p> A <a>notification</a> has an associated
55
52
<dfn for=notification id=concept-direction>direction</dfn> which is "<code> auto</code> ",
56
53
"<code> ltr</code> ", or "<code> rtl</code> ".
@@ -59,6 +56,9 @@ representation of something that happened, such as the delivery of a message.
59
56
<dfn for=notification id=concept-language>language</dfn> which is a string
60
57
representing either a valid BCP 47 language tag or the empty string.
61
58
59
+ <p> A <a>notification</a> has an associated <dfn for=notification id=body>body</dfn> which is a
60
+ string.
61
+
62
62
<p> A <a>notification</a> has an associated
63
63
<dfn for=notification id=tag>tag</dfn> which is a string.
64
64
@@ -90,8 +90,8 @@ indicates that producing sounds or vibrations should be left to platform convent
90
90
<p> A <a>notification</a> has an associated
91
91
<dfn for=notification id=require-interaction-preference-flag>require interaction preference</dfn>
92
92
boolean, which is initially false. When true, indicates that on devices with a sufficiently large
93
- screen, the notification should remain readily available until the user activates or dismisses the
94
- notification.
93
+ screen, the notification should remain readily available until the end user activates or dismisses
94
+ the notification.
95
95
96
96
<p> A <a>notification</a> <em> can</em> have these associated graphics: an
97
97
<dfn for=notification id=image-url>image URL</dfn> ,
@@ -129,10 +129,10 @@ support these features might ignore them.
129
129
for an end user. Each <a for=/>action</a> has an associated:
130
130
131
131
<dl>
132
- <dt> <dfn for=action id=action-title>title </dfn>
132
+ <dt> <dfn for=action id=action-name>name </dfn>
133
133
<dd> A string.
134
134
135
- <dt> <dfn for=action id=action-name>name </dfn>
135
+ <dt> <dfn for=action id=action-title>title </dfn>
136
136
<dd> A string.
137
137
138
138
<dt> <dfn for=action>icon URL</dfn>
@@ -146,12 +146,12 @@ for an end user. Each <a for=/>action</a> has an associated:
146
146
<dfn>maximum number of actions</dfn> supported is an <a>implementation-defined</a> integer of zero
147
147
or more, within the constraints of the notification platform.
148
148
149
- <p class=note> Since display of actions is platform-dependent, developers are
150
- encouraged to make sure that any action a user can invoke from a notification is
151
- also available within the web application.
149
+ <p class=note> Since display of actions is platform-dependent, developers are encouraged to make sure
150
+ that any action an end user can invoke from a notification is also available within the web
151
+ application.
152
152
153
153
<p class="note no-backref"> Some platforms might modify an <a for=action>icon resource</a> to better
154
- match the platform's visual style before displaying it to the user, for example by rounding the
154
+ match the platform's visual style before displaying it to the end user, for example by rounding the
155
155
corners or painting it in a specific color. Developers are encouraged to use an icon that handles
156
156
such cases gracefully and does not lose important information through, e.g., loss of color or
157
157
clipped corners.
@@ -218,19 +218,19 @@ string <var>title</var>, {{NotificationOptions}} <a for=/>dictionary</a> <var>op
218
218
<a for="environment settings object">API base URL</a> .
219
219
220
220
<li><p> If <var> options</var> ["{{NotificationOptions/image}}"] <a for=map>exists</a> , then
221
- <a lt="url parser">parse</a> it using <var> baseURL</var> , and if that does not return failure, set
222
- <var> notification</var> 's <a>image URL</a> to the return value. (Otherwise <a>image URL</a> is not
223
- set.)
221
+ <a lt="URL parser">parse</a> it using <var> baseURL</var> , and if that does not return failure, set
222
+ <var> notification</var> 's <a>image URL</a> to the return value. (Otherwise
223
+ <var> notification </var> 's <a>image URL</a> is not set.)
224
224
225
225
<li><p> If <var> options</var> ["{{NotificationOptions/icon}}"] <a for=map>exists</a> , then
226
- <a lt="url parser">parse</a> it using <var> baseURL</var> , and if that does not return failure, set
226
+ <a lt="URL parser">parse</a> it using <var> baseURL</var> , and if that does not return failure, set
227
227
<var> notification</var> 's <a for=notification>icon URL</a> to the return value. (Otherwise
228
- <a for=notification>icon URL</a> is not set.)
228
+ <var> notification </var> 's < a for=notification>icon URL</a> is not set.)
229
229
230
230
<li><p> If <var> options</var> ["{{NotificationOptions/badge}}"] <a for=map>exists</a> , then
231
- <a lt="url parser">parse</a> it using <var> baseURL</var> , and if that does not return failure, set
231
+ <a lt="URL parser">parse</a> it using <var> baseURL</var> , and if that does not return failure, set
232
232
<var> notification</var> 's <a for=notification>badge URL</a> to the return value. (Otherwise
233
- <a for=notification>badge URL</a> is not set.)
233
+ <var> notification </var> 's < a for=notification>badge URL</a> is not set.)
234
234
235
235
<li><p> If <var> options</var> ["{{NotificationOptions/vibrate}}"] <a for=map>exists</a> , then
236
236
<a>validate and normalize</a> it and set <var> notification</var> 's
@@ -267,9 +267,9 @@ string <var>title</var>, {{NotificationOptions}} <a for=/>dictionary</a> <var>op
267
267
<var> entry</var> ["{{NotificationAction/title}}"] .
268
268
269
269
<li><p> If <var> entry</var> ["{{NotificationAction/icon}}"] <a for=map>exists</a> , then
270
- <a lt="url parser">parse</a> it using <var> baseURL</var> , and if that does not return failure,
270
+ <a lt="URL parser">parse</a> it using <var> baseURL</var> , and if that does not return failure,
271
271
set <var> action</var> 's <a for=action>icon URL</a> to the return value. (Otherwise
272
- <a for=action>icon URL</a> remains null.)
272
+ <var> action </var> 's < a for=action>icon URL</a> remains null.)
273
273
274
274
<li><p> Append <var> action</var> to <var> notification</var> 's <a for=notification>actions</a> .
275
275
</ol>
@@ -340,8 +340,8 @@ of U+000A LINE FEED (LF) characters. For each paragraph of the
340
340
rules P2 and P3 if it has a value other than "<code> auto</code> ". [[!BIDI]]
341
341
342
342
<p> The <a>notification</a> 's <a for=notification>direction</a> also determines the relative order in
343
- which the <a>notification</a> 's <a for=notification>actions</a> should be displayed to the user, if
344
- the notification platform displays them side by side.
343
+ which the <a>notification</a> 's <a for=notification>actions</a> should be displayed to the end user,
344
+ if the notification platform displays them side by side.
345
345
346
346
347
347
<h3 id=language>Language</h3>
@@ -523,7 +523,7 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
523
523
<h3 id=activating-a-notification>Activating a notification</h3>
524
524
525
525
<p> When a <a>notification</a> <var> notification</var> , or one of its
526
- <a for=notification>actions</a> , is activated by the user, assuming the underlying notification
526
+ <a for=notification>actions</a> , is activated by the end user, assuming the underlying notification
527
527
platform supports activation, the user agent must (unless otherwise specified) run these steps:
528
528
529
529
<ol>
@@ -562,9 +562,8 @@ platform supports activation, the user agent must (unless otherwise specified) r
562
562
563
563
<h3 id=closing-a-notification>Closing a notification</h3>
564
564
565
- <p> When a <a>notification</a> is closed, either by the
566
- underlying notification platform or by the user, the <a>close steps</a> for it
567
- must be run.
565
+ <p> When a <a>notification</a> is closed, either by the underlying notification platform or by the
566
+ end user, the <a>close steps</a> for it must be run.
568
567
569
568
<p> The <dfn>close steps</dfn> for a given <var> notification</var> are:
570
569
@@ -581,7 +580,7 @@ must be run.
581
580
582
581
<ol>
583
582
<li><p> If <var> notification</var> is a <a>persistent notification</a> and <var> notification</var>
584
- was closed by the user, then <a>fire a service worker notification event</a> named
583
+ was closed by the end user, then <a>fire a service worker notification event</a> named
585
584
"<code> notificationclose</code> " given <var> notification</var> .
586
585
587
586
<li><p> If <var> notification</var> is a <a>non-persistent notification</a> , then <a>queue a task</a>
@@ -590,10 +589,9 @@ must be run.
590
589
</ol>
591
590
592
591
593
- <h3 id=alerting-the-user>Alerting the user</h3>
592
+ <h3 id=alerting-the-user>Alerting the end user</h3>
594
593
595
- <p> The <dfn>alert steps</dfn> for alerting the user about a given
596
- <var> notification</var> are:
594
+ <p> The <dfn>alert steps</dfn> for alerting the end user about a given <var> notification</var> are:
597
595
598
596
<ol>
599
597
<li><p> <a>Perform vibration</a> using <var> notification</var> 's
@@ -774,11 +772,9 @@ method steps are:
774
772
<li><p> Return <var> promise</var> .
775
773
</ol>
776
774
777
- <p class="warning"> Notifications are the one instance thus far where asking the
778
- user upfront makes sense. Specifications for other APIs should not use this
779
- pattern and instead employ one of the
780
- <a href="http://robert.ocallahan.org/2011/06/permissions-for-web-applications_30.html">
781
- many more suitable alternatives</a> .
775
+ <p class="warning"> Notifications are the one instance thus far where asking the end user upfront
776
+ makes sense. Specifications for other APIs should not use this pattern and instead employ one of the
777
+ <a href="http://robert.ocallahan.org/2011/06/permissions-for-web-applications_30.html">many more suitable alternatives</a> .
782
778
783
779
<p> The static <dfn attribute for=Notification><code>maxActions</code></dfn> getter steps are to
784
780
return the <a>maximum number of actions</a> supported.
@@ -922,8 +918,7 @@ then return null.
922
918
objects dispatch events during their lifecycle, which developers can use to
923
919
generate desired behaviors.
924
920
925
- <p> The <code> click</code> event dispatches when the user activates a
926
- notification.
921
+ <p> The <code> click</code> event dispatches when the end user activates a notification.
927
922
928
923
<pre class=example id=example-08e8ecea>
929
924
var not = new Notification("Gebrünn Gebrünn by Paul Kalkbrenner", { icon: "newsong.svg", tag: "song" });
@@ -936,8 +931,8 @@ not.onclick = function() { displaySong(this); };</pre>
936
931
<code> notificationclick</code> events on the {{ServiceWorkerGlobalScope}} .
937
932
938
933
<p> Here a service worker shows a notification with a single "Archive" <a for=/>action</a> , allowing
939
- users to perform this common task from the notification without having to open the website (for
940
- example the, notification platform might show a button on the notification). The user can also
934
+ end users to perform this common task from the notification without having to open the website (for
935
+ example, the notification platform might show a button on the notification). The end user can also
941
936
activate the main body of the notification to open their inbox.
942
937
943
938
<pre class=example id=example-50e7c86c>
@@ -957,13 +952,13 @@ self.addEventListener('notificationclick', function(event) {
957
952
958
953
<h4 id=tags-example>Using the <code>tag</code> member for multiple instances</h4>
959
954
960
- <p> Web applications frequently operate concurrently in multiple instances, such
961
- as when a user opens a mail application in multiple browser tabs. Since the
962
- desktop is a shared resource, the notifications API provides a way for these
963
- instances to easily coordinate, by using the <code> tag</code> member.
955
+ <p> Web applications frequently operate concurrently in multiple instances, such as when an end user
956
+ opens a mail application in multiple browser tabs. Since the desktop is a shared resource, the
957
+ notifications API provides a way for these instances to easily coordinate, by using the
958
+ <code> tag</code> member.
964
959
965
- <p> Notifications which represent the same conceptual event can be tagged in the
966
- same way, and when both are shown, the user will only receive one notification.
960
+ <p> Notifications which represent the same conceptual event can be tagged in the same way, and when
961
+ both are shown, the end user will only receive one notification.
967
962
968
963
<pre class=example id=example-2e2c735a>
969
964
Instance 1 | Instance 2
0 commit comments