@@ -16,8 +16,10 @@ urlPrefix: https://w3c.github.io/vibration/
16
16
text: validate and normalize
17
17
urlPrefix: #idl-def-; type: interface
18
18
text: VibratePattern; url: vibratepattern
19
- urlPrefix: https://tc39.github.io/ecma262/#sec-object.; type: dfn
20
- text: freeze
19
+ urlPrefix: https://tc39.github.io/ecma262/
20
+ urlPrefix: #sec-object.; type: dfn
21
+ text: freeze
22
+ url: #sec-list-and-record-specification-type; type: dfn; text: Record
21
23
</pre>
22
24
23
25
@@ -42,90 +44,88 @@ IDL, Service Workers, URL, and Vibration API Standards.
42
44
<p> A <dfn id=concept-notification>notification</dfn> is an abstract
43
45
representation of something that happened, such as the delivery of a message.
44
46
45
- <p> A <a>notification</a> has an associated
47
+ <p> A <a for=/ >notification</a> has an associated
46
48
<dfn for=notification id=service-worker-registration>service worker registration</dfn> (null
47
49
or a <a for=/>service worker registration</a> ). It is initially null.
48
50
49
- <p> A <a>notification</a> has an associated
50
- <dfn for=notification id=concept-title>title</dfn> which is a string.
51
+ <p> A <a for=/>notification</a> has an associated <dfn for=notification id=concept-title>title</dfn> (a string).
51
52
52
- <p> A <a>notification</a> has an associated
53
- <dfn for=notification id=concept-direction>direction</dfn> which is "<code> auto</code> ",
54
- " <code> ltr </code> ", or "<code> rtl</code> ".
53
+ <p> A <a for=/ >notification</a> has an associated
54
+ <dfn for=notification id=concept-direction>direction</dfn> ( "<code> auto</code> ", " <code> ltr </code> ",
55
+ or "<code> rtl</code> ") .
55
56
56
- <p> A <a>notification</a> has an associated
57
- <dfn for=notification id=concept-language>language</dfn> which is a string
58
- representing either a valid BCP 47 language tag or the empty string.
57
+ <p> A <a for=/>notification</a> has an associated
58
+ <dfn for=notification id=concept-language>language</dfn> (a string).
59
59
60
- <p> A <a>notification</a> has an associated <dfn for=notification id=body>body</dfn> which is a
61
- string.
60
+ <p> A <a for=/ >notification</a> has an associated <dfn for=notification id=body>body</dfn> ( a
61
+ string) .
62
62
63
- <p> A <a>notification</a> has an associated
64
- <dfn for=notification id=tag>tag</dfn> which is a string.
63
+ <p> A <a for=/>notification</a> has an associated <dfn for=notification id=tag>tag</dfn> (a string).
65
64
66
- <p> A <a>notification</a> has an associated
67
- <dfn for=notification id=data>data</dfn> .
65
+ <p> A <a for=/ >notification</a> has an associated <dfn for=notification id=data>data</dfn> (a
66
+ <a for=/>Record</a> ) .
68
67
69
- <p> A <a>notification</a> has an associated <dfn for=notification id=timestamp>timestamp</dfn> which
70
- is an {{EpochTimeStamp}} representing the time .
68
+ <p> A <a for=/ >notification</a> has an associated <dfn for=notification id=timestamp>timestamp</dfn>
69
+ ( an {{EpochTimeStamp}} ) .
71
70
72
71
<p class=note> Timestamps can be used to indicate the time at which a notification
73
72
is actual. For example, this could be in the past when a notification is used for
74
73
a message that couldn't immediately be delivered because the device was offline,
75
74
or in the future for a meeting that is about to start.
76
75
77
- <p> A <a>notification</a> has an associated
78
- <dfn for=notification id=concept-origin>origin</dfn> .
76
+ <p> A <a for=/ >notification</a> has an associated
77
+ <dfn for=notification id=concept-origin>origin</dfn> (an <a for=/>origin</a> ) .
79
78
80
- <p> A <a>notification</a> has an associated
81
- <dfn for=notification id=renotify-preference-flag>renotify preference</dfn> boolean, which is
79
+ <p> A <a for=/ >notification</a> has an associated
80
+ <dfn for=notification id=renotify-preference-flag>renotify preference</dfn> (a boolean). It is
82
81
initially false. When true, indicates that the end user should be alerted after the
83
82
<a>show steps</a> have run with a new notification that has the same <a for=notification>tag</a> as
84
83
an existing notification.
85
84
86
- <p> A <a>notification</a> has an associated
87
- <dfn for=notification id=silent-preference-flag>silent preference</dfn> boolean or null, which is
85
+ <p> A <a for=/ >notification</a> has an associated
86
+ <dfn for=notification id=silent-preference-flag>silent preference</dfn> (null or a boolean). It is
88
87
initially null. When true, indicates that no sounds or vibrations should be made. When null,
89
88
indicates that producing sounds or vibrations should be left to platform conventions.
90
89
91
- <p> A <a>notification</a> has an associated
90
+ <p> A <a for=/ >notification</a> has an associated
92
91
<dfn for=notification id=require-interaction-preference-flag>require interaction preference</dfn>
93
- boolean, which is initially false. When true, indicates that on devices with a sufficiently large
92
+ (a boolean). It is initially false. When true, indicates that on devices with a sufficiently large
94
93
screen, the notification should remain readily available until the end user activates or dismisses
95
94
the notification.
96
95
97
- <p> A <a>notification</a> <em> can</em> have these associated graphics: an
96
+ <p> A <a for=/ >notification</a> <em> can</em> have these associated graphics: an
98
97
<dfn for=notification id=image-url>image URL</dfn> ,
99
98
<dfn for=notification id=icon-url>icon URL</dfn> , and
100
99
<dfn for=notification id=badge-url>badge URL</dfn> ; and their corresponding
101
100
<a for=notification>image resource</a> , <a for=notification>icon resource</a> , and
102
101
<a for=notification>badge resource</a> .
103
102
104
103
<p> An <dfn for=notification id=image-resource>image resource</dfn> is a picture shown as part of the
105
- content of the <a>notification</a> , and should be displayed with higher visual priority than the
104
+ content of the <a for=/ >notification</a> , and should be displayed with higher visual priority than the
106
105
<a for=notification>icon resource</a> and <a for=notification>badge resource</a> , though it may be
107
106
displayed in fewer circumstances.
108
107
109
108
<p> An <dfn for=notification id=icon-resource>icon resource</dfn> is an image that reinforces the
110
- <a>notification</a> (such as an icon, or a photo of the sender).
109
+ <a for=/ >notification</a> (such as an icon, or a photo of the sender).
111
110
112
111
<p> A <dfn for=notification id=badge-resource>badge resource</dfn> is an icon representing the web
113
- application, or the category of the <a>notification</a> if the web application sends a wide variety
114
- of <a>notifications</a> . It <em> may</em> be used to represent the <a>notification</a> when there is
115
- not enough space to display the <a>notification</a> itself. It <em> may</em> also be displayed inside
116
- the <a>notification</a> , but then it should have less visual priority than the
112
+ application, or the category of the <a for=/ >notification</a> if the web application sends a wide variety
113
+ of <a>notifications</a> . It <em> may</em> be used to represent the <a for=/ >notification</a> when there is
114
+ not enough space to display the <a for=/ >notification</a> itself. It <em> may</em> also be displayed inside
115
+ the <a for=/ >notification</a> , but then it should have less visual priority than the
117
116
<a for=notification>image resource</a> and <a for=notification>icon resource</a> .
118
117
119
- <p> A <a>notification</a> has an associated
120
- <dfn for=notification id=vibration-pattern>vibration pattern</dfn> , which is initially « ».
118
+ <p> A <a for=/>notification</a> has an associated
119
+ <dfn for=notification id=vibration-pattern>vibration pattern</dfn> (a <a for=/>list</a> ). It is
120
+ initially « ».
121
121
122
122
<p class=note> Developers are encouraged to not convey information through an
123
123
<a for=notification lt="image resource">image</a> , <a for=notification lt="icon resource">icon</a> ,
124
124
<a for=notification lt="badge resource">badge</a> , or <a for=notification>vibration pattern</a> that
125
125
is not otherwise accessible to the end user, especially since notification platforms that do not
126
126
support these features might ignore them.
127
127
128
- <p> A <a>notification</a> has associated <dfn for=notification id=actions>actions</dfn> (a
128
+ <p> A <a for=/ >notification</a> has associated <dfn for=notification id=actions>actions</dfn> (a
129
129
<a for=/>list</a> of zero or more <a for=/>actions</a> ). An <dfn>action</dfn> represents a choice
130
130
for an end user. Each <a for=/>action</a> has an associated:
131
131
@@ -157,10 +157,10 @@ corners or painting it in a specific color. Developers are encouraged to use an
157
157
such cases gracefully and does not lose important information through, e.g., loss of color or
158
158
clipped corners.
159
159
160
- <p> A <dfn>non-persistent notification</dfn> is a <a>notification</a> whose
160
+ <p> A <dfn>non-persistent notification</dfn> is a <a for=/ >notification</a> whose
161
161
<a for=notification>service worker registration</a> is null.
162
162
163
- <p tracking-vector> A <dfn>persistent notification</dfn> is a <a>notification</a> whose
163
+ <p tracking-vector> A <dfn>persistent notification</dfn> is a <a for=/ >notification</a> whose
164
164
<a for=notification>service worker registration</a> is non-null.
165
165
166
166
<hr>
@@ -193,7 +193,7 @@ clipped corners.
193
193
<var> fallbackTimestamp</var> :
194
194
195
195
<ol>
196
- <li><p> Let <var> notification</var> be a new <a>notification</a> .
196
+ <li><p> Let <var> notification</var> be a new <a for=/ >notification</a> .
197
197
198
198
<li><p> If <var> options</var> ["{{NotificationOptions/silent}}"] is true and
199
199
<var> options</var> ["{{NotificationOptions/vibrate}}"] <a for=map>exists</a> , then <a>throw</a> a
@@ -333,32 +333,32 @@ section of HTML. [[!HTML]]
333
333
https://html.spec.whatwg.org/multipage/rendering.html#text-rendered-in-native-user-interfaces -->
334
334
335
335
<p> User agents are expected to honor the Unicode semantics of the text of a
336
- <a>notification</a> 's <a for=notification>title</a> , <a for=notification>body</a> , and the
336
+ <a for=/ >notification</a> 's <a for=notification>title</a> , <a for=notification>body</a> , and the
337
337
<a for=action>title</a> of each of its <a for=notification>actions</a> . Each is expected
338
338
to be treated as an independent set of one or more bidirectional algorithm
339
339
paragraphs when displayed, as defined by the bidirectional algorithm's rules P1,
340
340
P2, and P3, including, for instance, supporting the paragraph-breaking behavior
341
341
of U+000A LINE FEED (LF) characters. For each paragraph of the
342
342
<a for=notification>title</a> , <a for=notification>body</a> and the
343
343
<a for=action>title</a> of each of the <a for=notification>actions</a> , the
344
- <a>notification</a> 's
344
+ <a for=/ >notification</a> 's
345
345
<a for=notification>direction</a> provides the higher-level override of
346
346
rules P2 and P3 if it has a value other than "<code> auto</code> ". [[!BIDI]]
347
347
348
- <p> The <a>notification</a> 's <a for=notification>direction</a> also determines the relative order in
349
- which the <a>notification</a> 's <a for=notification>actions</a> should be displayed to the end user,
350
- if the notification platform displays them side by side.
348
+ <p> The <a for=/ >notification</a> 's <a for=notification>direction</a> also determines the relative
349
+ order in which the <a for=/ >notification</a> 's <a for=notification>actions</a> should be displayed
350
+ to the end user, if the notification platform displays them side by side.
351
351
352
352
353
353
<h3 id=language>Language</h3>
354
354
355
355
<!-- keep this in sync with
356
356
https://html.spec.whatwg.org/multipage/dom.html#attr-lang -->
357
357
358
- <p> The <a>notification</a> 's <a for=notification>language</a> specifies the primary language for the
359
- <a >notification</a> 's <a for=notification>title</a> , <a for=notification>body</a> and the
360
- <a for=notification>title</a> of each of its <a for=notification>actions</a> . Its value is a string.
361
- The empty string indicates that the primary language is unknown. Any other string must be
358
+ <p> The <a for=/ >notification</a> 's <a for=notification>language</a> specifies the primary language
359
+ for the <a for=/ >notification</a> 's <a for=notification>title</a> , <a for=notification>body</a> and
360
+ the <a for=notification>title</a> of each of its <a for=notification>actions</a> . Its value is a
361
+ string. The empty string indicates that the primary language is unknown. Any other string must be
362
362
interpreted as a language tag. Validity or well-formedness are not enforced. [[!BCP47]]
363
363
364
364
<p class=note> Developers are encouraged to only use valid language tags.
@@ -478,7 +478,7 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
478
478
479
479
<li><p> Let <var> shown</var> be false.
480
480
481
- <li><p> Let <var> oldNotification</var> be the <a>notification</a> in the
481
+ <li><p> Let <var> oldNotification</var> be the <a for=/ >notification</a> in the
482
482
<a>list of notifications</a> whose <a for=notification>tag</a> is not the empty string and is
483
483
<var> notification</var> 's <a for=notification>tag</a> , and whose <a for=notification>origin</a> is
484
484
<a>same origin</a> with <var> notification</var> 's <a for=notification>origin</a> , if any, and null
@@ -572,8 +572,8 @@ platform supports activation, the user agent must (unless otherwise specified) r
572
572
573
573
<h3 id=closing-a-notification>Closing a notification</h3>
574
574
575
- <p> When a <a>notification</a> is closed, either by the underlying notification platform or by the
576
- end user, the <a>close steps</a> for it must be run.
575
+ <p> When a <a for=/ >notification</a> is closed, either by the underlying notification platform or by
576
+ the end user, the <a>close steps</a> for it must be run.
577
577
578
578
<div algorithm>
579
579
<p> The <dfn>close steps</dfn> for a given <a for=/>notification</a> <var> notification</var> are:
@@ -702,7 +702,7 @@ object and can be created through {{Notification}}'s
702
702
<h3 id=garbage-collection>Garbage collection</h3>
703
703
704
704
<p> A {{Notification}} object must not be garbage collected while the <a>list of notifications</a>
705
- <a for=list>contains</a> its corresponding <a>notification</a> and it has an
705
+ <a for=list>contains</a> its corresponding <a for=/ >notification</a> and it has an
706
706
<a for=/>event listener</a> whose <b> type</b> is <code> click</code> , <code> show</code> ,
707
707
<code> close</code> , or <code> error</code> .
708
708
@@ -835,70 +835,70 @@ return the <a>maximum number of actions</a> supported.
835
835
</table>
836
836
837
837
<p> The <dfn method for=Notification><code>close()</code></dfn> method steps are to run the
838
- <a>close steps</a> for <a>this</a> 's <a>notification</a> .
838
+ <a>close steps</a> for <a>this</a> 's <a for=/ >notification</a> .
839
839
840
840
<p> The <dfn attribute for=Notification><code>title</code></dfn> getter steps are to return
841
- <a>this</a> 's <a>notification</a>' s <a for=notification>title</a> .
841
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>title</a> .
842
842
843
843
<p> The <dfn attribute for=Notification><code>dir</code></dfn> getter steps are to return
844
- <a>this</a> 's <a>notification</a>' s <a for=notification>direction</a> .
844
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>direction</a> .
845
845
846
846
<p> The <dfn attribute for=Notification><code>lang</code></dfn> getter steps are to return
847
- <a>this</a> 's <a>notification</a>' s <a for=notification>language</a> .
847
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>language</a> .
848
848
849
849
<p> The <dfn attribute for=Notification><code>body</code></dfn> getter steps are to return
850
- <a>this</a> 's <a>notification</a>' s <a for=notification>body</a> .
850
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>body</a> .
851
851
852
852
<p> The <dfn attribute for=Notification><code>tag</code></dfn> getter steps are to return
853
- <a>this</a> 's <a>notification</a>' s <a for=notification>tag</a> .
853
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>tag</a> .
854
854
855
855
<p> The <dfn attribute dfn-for=Notification><code>image</code></dfn> getter steps are:
856
856
857
857
<ol>
858
- <li><p> If there is no <a>this</a> 's <a>notification</a>' s <a for=notification>image URL</a> , then
858
+ <li><p> If there is no <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>image URL</a> , then
859
859
return the empty string.
860
860
861
- <li><p> Return <a>this</a> 's <a>notification</a>' s <a for=notification>image URL</a> ,
861
+ <li><p> Return <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>image URL</a> ,
862
862
<a lt="URL serializer">serialized</a> .
863
863
</ol>
864
864
865
865
<p> The <dfn attribute for=Notification><code>icon</code></dfn> getter steps are:
866
866
867
867
<ol>
868
- <li><p> If there is no <a>this</a> 's <a>notification</a>' s <a for=notification>icon URL</a> , then
868
+ <li><p> If there is no <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>icon URL</a> , then
869
869
return the empty string.
870
870
871
- <li><p> Return <a>this</a> 's <a>notification</a>' s <a for=notification>icon URL</a> ,
871
+ <li><p> Return <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>icon URL</a> ,
872
872
<a lt="URL serializer">serialized</a> .
873
873
</ol>
874
874
875
875
<p> The <dfn attribute for=Notification><code>badge</code></dfn> getter steps are:
876
876
877
877
<ol>
878
- <li><p> If there is no <a>this</a> 's <a>notification</a>' s <a for=notification>badge URL</a> , then
878
+ <li><p> If there is no <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>badge URL</a> , then
879
879
return the empty string.
880
880
881
- <li><p> Return <a>this</a> 's <a>notification</a>' s <a for=notification>badge URL</a> ,
881
+ <li><p> Return <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>badge URL</a> ,
882
882
<a lt="URL serializer">serialized</a> .
883
883
</ol>
884
884
885
885
<p> The <dfn attribute for=Notification><code>vibrate</code></dfn> getter steps are to return
886
- <a>this</a> 's <a>notification</a>' s <a for=notification>vibration pattern</a> .
886
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>vibration pattern</a> .
887
887
888
888
<p> The <dfn attribute for=Notification><code>timestamp</code></dfn> getter steps are to return
889
- <a>this</a> 's <a>notification</a>' s <a for=notification>timestamp</a> .
889
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>timestamp</a> .
890
890
891
891
<p> The <dfn attribute for=Notification><code>renotify</code></dfn> getter steps are to return
892
- <a>this</a> 's <a>notification</a>' s <a for=notification>renotify preference</a> .
892
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>renotify preference</a> .
893
893
894
894
<p> The <dfn attribute for=Notification><code>silent</code></dfn> getter steps are to return
895
- <a>this</a> 's <a>notification</a>' s <a for=notification>silent preference</a> .
895
+ <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>silent preference</a> .
896
896
897
897
<p> The <dfn attribute for=Notification><code>requireInteraction</code></dfn> getter steps are to
898
- return <a>this</a> 's <a>notification</a>' s <a for=notification>require interaction preference</a> .
898
+ return <a>this</a> 's <a for=/ >notification</a>' s <a for=notification>require interaction preference</a> .
899
899
900
900
<p> The <dfn attribute for=Notification><code>data</code></dfn> getter steps are to return
901
- <a abstract-op>StructuredDeserialize</a> (<a>this</a> 's <a>notification</a>' s
901
+ <a abstract-op>StructuredDeserialize</a> (<a>this</a> 's <a for=/ >notification</a>' s
902
902
<a for=notification>data</a> , <a>this</a> 's <a>relevant Realm</a> ). If this throws an exception,
903
903
then return null.
904
904
<!-- Relies on SameObject becoming Cached as proposed -->
@@ -909,7 +909,7 @@ then return null.
909
909
<li><p> Let <var> frozenActions</var> be an empty list of type {{NotificationAction}} .
910
910
911
911
<li>
912
- <p> <a for=list>For each</a> <var> entry</var> of <a>this</a> 's <a>notification</a>' s
912
+ <p> <a for=list>For each</a> <var> entry</var> of <a>this</a> 's <a for=/ >notification</a>' s
913
913
<a for=notification>actions</a> :
914
914
915
915
<ol>
@@ -1138,9 +1138,9 @@ method steps are:
1138
1138
<ol>
1139
1139
<li><p> Let <var> objects</var> be a <a for=/>list</a> .
1140
1140
1141
- <li><p> <a for=list>For each</a> <a>notification</a> in <var> notifications</var> , in creation
1141
+ <li><p> <a for=list>For each</a> <a for=/ >notification</a> in <var> notifications</var> , in creation
1142
1142
order, create a <a for=/>new</a> {{Notification}} object with <var> realm</var> representing
1143
- <a>notification</a> , and <a for=list>append</a> it to <var> objects</var> .
1143
+ <a for=/ >notification</a> , and <a for=list>append</a> it to <var> objects</var> .
1144
1144
1145
1145
<li><p> <a for=/>Resolve</a> <var> promise</var> with <var> objects</var> .
1146
1146
</ol>
@@ -1150,7 +1150,7 @@ method steps are:
1150
1150
</ol>
1151
1151
1152
1152
<p class=note> This method returns zero or more new {{Notification}} objects which might represent
1153
- the same underlying <a>notification</a> of {{Notification}} objects already in existence.
1153
+ the same underlying <a for=/ >notification</a> of {{Notification}} objects already in existence.
1154
1154
</div>
1155
1155
1156
1156
<hr>
0 commit comments