You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[=registered=] it into the [=highlights register=].
210
+
[=registered=] it into the [=highlight registry=].
211
211
212
-
The <dfn>highlights register</dfn> is accessed via the {{CSS/highlights}} attribute of the {{CSS}} namespace,
212
+
The <dfn>highlight registry</dfn> is accessed via the {{CSS/highlights}} attribute of the {{CSS}} namespace,
213
213
and represents all the [=custom highlights=][=registered=] for the [=current global object=]’s [=associated Document=].
214
214
It is a [=setlike=], and can be updated using the usual methods.
215
215
It's [=set entries=] is initially empty.
216
216
217
217
A [=custom highlight=] is said to be <dfn>registered</dfn>
218
-
if it is in the [=highlights register=].
218
+
if it is in the [=highlight registry=].
219
219
It stops being [=registered=] if it is later removed.
220
220
221
221
<xmp class="idl">
222
222
partial namespace CSS {
223
-
readonly attribute HighlightsRegister highlights;
223
+
readonly attribute HighlightRegistry highlights;
224
224
};
225
225
226
226
[Exposed=Window]
227
-
interface HighlightsRegister {
227
+
interface HighlightRegistry {
228
228
setlike<Highlight>;
229
-
HighlightsRegister add(Highlight value);
229
+
HighlightRegistry add(Highlight value);
230
230
};
231
231
</xmp>
232
232
233
233
<div algorithm="to register a custom highlight">
234
234
To [=register=] a [=custom highlight=],
235
-
invoke the {{HighlightsRegister/add()}} of the [=highlights register=]
235
+
invoke the {{HighlightRegistry/add()}} of the [=highlight registry=]
236
236
with the [=custom highlight=] as the argument.
237
237
238
238
When invoked,
239
-
the <dfn method for=HighlightsRegister>add(Highlight value)</dfn> method must run these steps:
239
+
the <dfn method for=HighlightRegistry>add(Highlight value)</dfn> method must run these steps:
240
240
241
241
1. If there is already a [=set entry=] with the same {{Highlight/name}} as the {{Highlight/name}} of {{value}},
242
242
then [=throw=] an {{"OperationError"}}.
@@ -405,7 +405,7 @@ Priority of Overlapping Highlights</h4>
405
405
As there are no priorities set
406
406
(i.e. there is a tie between <code>rg1</code> and <code>rg2</code>),
407
407
the custom highlights' styles are stacked
408
-
in order of insertion into the [=highlights register=].
408
+
in order of insertion into the [=highlight registry=].
409
409
The rendered results will have "Som" with blue text on yellow background,
410
410
"e t" with blue text on orange background,
411
411
and "ext" with the default color on orange background.
@@ -431,7 +431,7 @@ Responding to Changes</h2>
431
431
Repaints</h3>
432
432
433
433
The addition or removal
434
-
of a [=custom highlight=] in the [=highlights register=],
434
+
of a [=custom highlight=] in the [=highlight registry=],
435
435
or of a [=range=] in a [registered=][=custom highlight=],
436
436
must cause the User Agent to reevaluate the rendering,
437
437
and to repaint if appropriate.
@@ -482,7 +482,7 @@ Range Updating and Invalidation</h3>
482
482
483
483
When computing how to render the document,
484
484
if [=start node=] or [=end node=] of any [=range=]
485
-
in the [=highlights register=]
485
+
in the [=highlight regsitry=]
486
486
refer to a {{Node}} which is no longer [=in a document tree=],
487
487
the User Agent must ignored that [=range=].
488
488
If the [=start offset=] or [=end offset=] of any [=range=]
@@ -558,11 +558,11 @@ Appendix C. Changes</h2>
558
558
<!-- This text from the explainer seems useful, and should go somewhere. But where?
559
559
----
560
560
If there are DOM/CSS changes that result in a different cascaded highlight map for a given element,
561
-
and there exists one or more Range objects in the highlights register for the cascaded identifiers,
561
+
and there exists one or more Range objects in the highlight registry for the cascaded identifiers,
562
562
the layout representation of that element should be notified that the painting of the element might have changed.
563
563
564
564
Ranges that are positioned inside of documents that are not in the view are ignored.
565
565
566
-
The HighlightsRegister is per-document — therefore, Ranges that are positioned inside of a different document than the HighlightsRegister it is a part of are ignored for rendering.
566
+
The HighlightRegistry is per-document — therefore, Ranges that are positioned inside of a different document than the HighlightRegistry it is a part of are ignored for rendering.
0 commit comments