@@ -169,17 +169,22 @@ <h2>
169
169
Declarative push message
170
170
</ h2 >
171
171
< 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=].
175
176
</ p >
176
177
< 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.
179
184
</ p >
180
185
< pre class ="example ">
181
186
{
182
- "web_push": 9001 ,
187
+ "web_push": 8030 ,
183
188
"notification": {
184
189
"title": "Watch the new season of Return of the Example now!",
185
190
"lang": "en-US",
202
207
</ dt >
203
208
< dd >
204
209
< 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=]
206
211
from other JSON documents.
207
212
</ p >
208
213
</ dd >
@@ -304,7 +309,11 @@ <h3>
304
309
</ dt >
305
310
< dd >
306
311
< 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]]
308
317
</ p >
309
318
</ dd >
310
319
</ dl >
345
354
</ li >
346
355
< li >
347
356
< 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.
349
358
</ p >
350
359
</ li >
351
360
< li >
428
437
< p >
429
438
If < var > message</ var > ["`app_badge`"] [=map/exists=] and
430
439
< 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 -->
434
443
</ li >
435
444
< li >
436
445
< p >
0 commit comments