|
50 | 50 | };
|
51 | 51 | </script>
|
52 | 52 | </head>
|
53 |
| - <body data-cite="service-workers FILEAPI secure-contexts hr-time"> |
| 53 | + <body data-cite="service-workers FILEAPI secure-contexts hr-time ECMASCRIPT"> |
54 | 54 | <section id="abstract">
|
55 | 55 | <p>
|
56 | 56 | The <cite>Push API</cite> enables sending of a <a>push message</a> to a web application via
|
@@ -120,11 +120,6 @@ <h2>
|
120 | 120 | <h2>
|
121 | 121 | Dependencies
|
122 | 122 | </h2>
|
123 |
| - <p> |
124 |
| - <code><dfn data-cite="ECMASCRIPT#sec-json.parse">JSON.parse()</dfn></code> and |
125 |
| - <code><dfn data-cite="ECMASCRIPT#sec-json.stringify">JSON.stringify()</dfn></code> are |
126 |
| - defined in [[ECMASCRIPT]]. |
127 |
| - </p> |
128 | 123 | <p>
|
129 | 124 | The <dfn>web push protocol</dfn> [[RFC8030]] describes a protocol that enables
|
130 | 125 | communication between a <a>user agent</a> or <a>application server</a> and a <a>push
|
@@ -378,10 +373,10 @@ <h2>
|
378 | 373 | <a>push subscription</a> to send <a>push messages</a> to another <a>push subscription</a>.
|
379 | 374 | </p>
|
380 | 375 | <p>
|
381 |
| - <a>User agents</a> MUST implement the Push API to only be available in a <a data-cite= |
382 |
| - "secure-contexts#secure-context">secure context</a>. This provides better protection for |
383 |
| - the user against man-in-the-middle attacks intended to obtain push subscription data. |
384 |
| - Browsers may ignore this rule for development purposes only. |
| 376 | + <a>User agents</a> MUST implement the Push API to only be available in a [=secure |
| 377 | + context=]. This provides better protection for the user against man-in-the-middle attacks |
| 378 | + intended to obtain push subscription data. Browsers may ignore this rule for development |
| 379 | + purposes only. |
385 | 380 | </p>
|
386 | 381 | </section>
|
387 | 382 | <section class="informative" id="pushframework">
|
|
494 | 489 | Extensions to the `ServiceWorkerRegistration` Interface
|
495 | 490 | </h2>
|
496 | 491 | <p>
|
497 |
| - The Service Worker specification defines a <code><dfn data-cite= |
498 |
| - "service-workers#serviceworkerregistration">ServiceWorkerRegistration</dfn></code> |
499 |
| - interface [[SERVICE-WORKERS]], which this specification extends. |
| 492 | + The Service Worker specification defines a {{ServiceWorkerRegistration}} interface |
| 493 | + [[SERVICE-WORKERS]], which this specification extends. |
500 | 494 | </p>
|
501 | 495 | <pre class="idl" data-cite="service-workers">
|
502 | 496 | [SecureContext]
|
|
506 | 500 | </pre>
|
507 | 501 | <p>
|
508 | 502 | The <dfn>pushManager</dfn> attribute exposes a {{PushManager}}, which has an associated
|
509 |
| - <a>service worker registration</a> represented by the <a>ServiceWorkerRegistration</a> on |
| 503 | + <a>service worker registration</a> represented by the {{ServiceWorkerRegistration}} on |
510 | 504 | which the attribute is exposed.
|
511 | 505 | </p>
|
512 | 506 | </section>
|
|
546 | 540 | </li>
|
547 | 541 | <li>Return |promise| and continue the following steps asynchronously.
|
548 | 542 | </li>
|
549 |
| - <li>If the <a>current settings object</a> is not a <a data-cite= |
550 |
| - "secure-contexts#secure-context">secure context</a>, reject |promise| with a |
551 |
| - {{DOMException}} whose name is {{"SecurityError"}} and terminate these steps. |
| 543 | + <li>If the <a>current settings object</a> is not a [=secure context=], reject |promise| |
| 544 | + with a {{DOMException}} whose name is {{"SecurityError"}} and terminate these steps. |
552 | 545 | </li>
|
553 | 546 | <li>If the |options| argument includes a non-null value for the
|
554 | 547 | {{PushSubscriptionOptions/applicationServerKey}} attribute, run the following sub-steps:
|
|
880 | 873 | <p>
|
881 | 874 | A <dfn>PushSubscriptionJSON</dfn> dictionary represents the <a>JSON type</a> of a
|
882 | 875 | {{PushSubscription}}. In ECMAScript this can be converted into a JSON string through the
|
883 |
| - <a>JSON.stringify()</a> function. |
| 876 | + `JSON`.{{JSON/stringify()}} function. |
884 | 877 | </p>
|
885 | 878 | <p>
|
886 | 879 | The <dfn data-dfn-for="PushSubscriptionJSON">keys</dfn> record contains an entry for each
|
|
944 | 937 | </p>
|
945 | 938 | <p data-cite="encoding">
|
946 | 939 | The <dfn>json()</dfn> method, when invoked, MUST return the result of invoking the initial
|
947 |
| - value of <a>JSON.parse()</a> with the result of running <a>utf-8 decode</a> on |bytes| as |
948 |
| - argument. Re-throw any exceptions thrown by <a>JSON.parse()</a>. |
| 940 | + value of `JSON`.{{JSON/parse()}} with the result of running <a>utf-8 decode</a> on |bytes| |
| 941 | + as argument. Re-throw any exceptions thrown by `JSON`.{{JSON/parse()}}. |
949 | 942 | </p>
|
950 | 943 | <p data-cite="encoding">
|
951 | 944 | The <dfn>text</dfn> method, when invoked, MUST return the result of running <a>utf-8
|
|
986 | 979 | Extensions to the `ServiceWorkerGlobalScope` interface
|
987 | 980 | </h2>
|
988 | 981 | <p>
|
989 |
| - The Service Worker specification defines a <dfn data-cite= |
990 |
| - "service-workers#serviceworkerglobalscope">ServiceWorkerGlobalScope</dfn> interface |
| 982 | + The Service Worker specification defines a {{ServiceWorkerGlobalScope}} interface |
991 | 983 | [[SERVICE-WORKERS]], which this specification extends.
|
992 | 984 | </p>
|
993 | 985 | <pre class="idl" data-cite="HTML">
|
|
0 commit comments