Skip to content

Commit 221c867

Browse files
authored
Editorially: generally refer to user as end user
And reorder a couple of things so they are consistent across concepts and IDL.
1 parent 0fd4b82 commit 221c867

File tree

1 file changed

+40
-45
lines changed

1 file changed

+40
-45
lines changed

notifications.bs

Lines changed: 40 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ representation of something that happened, such as the delivery of a message.
4848
<p>A <a>notification</a> has an associated
4949
<dfn for=notification id=concept-title>title</dfn> which is a string.
5050

51-
<p>A <a>notification</a> has an associated
52-
<dfn for=notification id=body>body</dfn> which is a string.
53-
5451
<p>A <a>notification</a> has an associated
5552
<dfn for=notification id=concept-direction>direction</dfn> which is "<code>auto</code>",
5653
"<code>ltr</code>", or "<code>rtl</code>".
@@ -59,6 +56,9 @@ representation of something that happened, such as the delivery of a message.
5956
<dfn for=notification id=concept-language>language</dfn> which is a string
6057
representing either a valid BCP 47 language tag or the empty string.
6158

59+
<p>A <a>notification</a> has an associated <dfn for=notification id=body>body</dfn> which is a
60+
string.
61+
6262
<p>A <a>notification</a> has an associated
6363
<dfn for=notification id=tag>tag</dfn> which is a string.
6464

@@ -90,8 +90,8 @@ indicates that producing sounds or vibrations should be left to platform convent
9090
<p>A <a>notification</a> has an associated
9191
<dfn for=notification id=require-interaction-preference-flag>require interaction preference</dfn>
9292
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.
9595

9696
<p>A <a>notification</a> <em>can</em> have these associated graphics: an
9797
<dfn for=notification id=image-url>image URL</dfn>,
@@ -129,10 +129,10 @@ support these features might ignore them.
129129
for an end user. Each <a for=/>action</a> has an associated:
130130

131131
<dl>
132-
<dt><dfn for=action id=action-title>title</dfn>
132+
<dt><dfn for=action id=action-name>name</dfn>
133133
<dd>A string.
134134

135-
<dt><dfn for=action id=action-name>name</dfn>
135+
<dt><dfn for=action id=action-title>title</dfn>
136136
<dd>A string.
137137

138138
<dt><dfn for=action>icon URL</dfn>
@@ -146,12 +146,12 @@ for an end user. Each <a for=/>action</a> has an associated:
146146
<dfn>maximum number of actions</dfn> supported is an <a>implementation-defined</a> integer of zero
147147
or more, within the constraints of the notification platform.
148148

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.
152152

153153
<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
155155
corners or painting it in a specific color. Developers are encouraged to use an icon that handles
156156
such cases gracefully and does not lose important information through, e.g., loss of color or
157157
clipped corners.
@@ -218,19 +218,19 @@ string <var>title</var>, {{NotificationOptions}} <a for=/>dictionary</a> <var>op
218218
<a for="environment settings object">API base URL</a>.
219219

220220
<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.)
224224

225225
<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
227227
<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.)
229229

230230
<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
232232
<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.)
234234

235235
<li><p>If <var>options</var>["{{NotificationOptions/vibrate}}"] <a for=map>exists</a>, then
236236
<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
267267
<var>entry</var>["{{NotificationAction/title}}"].
268268

269269
<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,
271271
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.)
273273

274274
<li><p>Append <var>action</var> to <var>notification</var>'s <a for=notification>actions</a>.
275275
</ol>
@@ -340,8 +340,8 @@ of U+000A LINE FEED (LF) characters. For each paragraph of the
340340
rules P2 and P3 if it has a value other than "<code>auto</code>". [[!BIDI]]
341341

342342
<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.
345345

346346

347347
<h3 id=language>Language</h3>
@@ -523,7 +523,7 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
523523
<h3 id=activating-a-notification>Activating a notification</h3>
524524

525525
<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
527527
platform supports activation, the user agent must (unless otherwise specified) run these steps:
528528

529529
<ol>
@@ -562,9 +562,8 @@ platform supports activation, the user agent must (unless otherwise specified) r
562562

563563
<h3 id=closing-a-notification>Closing a notification</h3>
564564

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.
568567

569568
<p>The <dfn>close steps</dfn> for a given <var>notification</var> are:
570569

@@ -581,7 +580,7 @@ must be run.
581580

582581
<ol>
583582
<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
585584
"<code>notificationclose</code>" given <var>notification</var>.
586585

587586
<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.
590589
</ol>
591590

592591

593-
<h3 id=alerting-the-user>Alerting the user</h3>
592+
<h3 id=alerting-the-user>Alerting the end user</h3>
594593

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:
597595

598596
<ol>
599597
<li><p><a>Perform vibration</a> using <var>notification</var>'s
@@ -774,11 +772,9 @@ method steps are:
774772
<li><p>Return <var>promise</var>.
775773
</ol>
776774

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>.
782778

783779
<p>The static <dfn attribute for=Notification><code>maxActions</code></dfn> getter steps are to
784780
return the <a>maximum number of actions</a> supported.
@@ -922,8 +918,7 @@ then return null.
922918
objects dispatch events during their lifecycle, which developers can use to
923919
generate desired behaviors.
924920

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.
927922

928923
<pre class=example id=example-08e8ecea>
929924
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>
936931
<code>notificationclick</code> events on the {{ServiceWorkerGlobalScope}}.
937932

938933
<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
941936
activate the main body of the notification to open their inbox.
942937

943938
<pre class=example id=example-50e7c86c>
@@ -957,13 +952,13 @@ self.addEventListener('notificationclick', function(event) {
957952

958953
<h4 id=tags-example>Using the <code>tag</code> member for multiple instances</h4>
959954

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.
964959

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.
967962

968963
<pre class=example id=example-2e2c735a>
969964
Instance 1 | Instance 2

0 commit comments

Comments
 (0)