Skip to content

Commit 7b3b218

Browse files
committed
address some of the feedback
1 parent f69a02b commit 7b3b218

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

index.html

+21-12
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,22 @@ <h2>
169169
Declarative push message
170170
</h2>
171171
<p>
172-
A <dfn>declarative push message</dfn> is a [=push message=] whose data is encoded in such
173-
a way that it results in some automatic action on behalf of the web application. E.g.,
174-
the creation and display of a notification.
172+
A <dfn>declarative push message</dfn> is a [=push message=] whose data is a JSON document
173+
that is understood by the user agent. A user agent opportunistically parses each incoming
174+
[=push message=] to determine if it is a [=declarative push message=] using the
175+
[=declarative push message parser=].
175176
</p>
176177
<p>
177-
A [=declarative push message=] is a JSON document that contains the instructions to
178-
create and display a notification.
178+
A [=declarative push message=] allows for the creation and display of a notification
179+
without the involvement of a service worker. Nevertheless, a service worker can still be
180+
involved if desired by the [=application server=]. In such a scenario the declarative
181+
nature of the [=push message=] serves as a backup in case the service worker was evicted
182+
due to storage pressure, for instance. And also provides a more object-oriented approach
183+
to transmitting notification data.
179184
</p>
180185
<pre class="example">
181186
{
182-
"web_push": 9001,
187+
"web_push": 8030,
183188
"notification": {
184189
"title": "Watch the new season of Return of the Example now!",
185190
"lang": "en-US",
@@ -202,7 +207,7 @@ <h3>
202207
</dt>
203208
<dd>
204209
<p>
205-
An integer that must be 9001. Used to disambiguate a [=declarative push message=]
210+
An integer that must be 8030. Used to disambiguate a [=declarative push message=]
206211
from other JSON documents.
207212
</p>
208213
</dd>
@@ -304,7 +309,11 @@ <h3>
304309
</dt>
305310
<dd>
306311
<p>
307-
An integer in the range 0 to 9223372036854775807, inclusive.
312+
An integer in the range 0 to 18446744073709551615 (2<sup>64</sup> − 1), inclusive.
313+
</p>
314+
<p class="note">
315+
Platform conventions are likely to impose a lower limit with regards to what is
316+
displayed to the end user. [[BADGING]]
308317
</p>
309318
</dd>
310319
</dl>
@@ -345,7 +354,7 @@ <h3>
345354
</li>
346355
<li>
347356
<p>
348-
If <var>message</var>["`web_push`"] is not 9001, then return failure.
357+
If <var>message</var>["`web_push`"] is not 8030, then return failure.
349358
</p>
350359
</li>
351360
<li>
@@ -428,9 +437,9 @@ <h3>
428437
<p>
429438
If <var>message</var>["`app_badge`"] [=map/exists=] and
430439
<var>message</var>["`app_badge`"] is an integer in the range 0 to
431-
9223372036854775807, inclusive, then set <var>appBadge</var> to
432-
<var>message</var>["`app_badge`"].
433-
</p>
440+
18446744073709551615 (2<sup>64</sup> − 1), inclusive, then set <var>appBadge</var>
441+
to <var>message</var>["`app_badge`"].
442+
</p><!-- unsigned long long in Web IDL -->
434443
</li>
435444
<li>
436445
<p>

0 commit comments

Comments
 (0)