@@ -8798,77 +8798,80 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
8798
8798
8799
8799
<h4>Using reflect via IDL extended attributes</h4>
8800
8800
8801
- <p>To enable improved usage of <span data-x="reflect">reflection</span>, we introduce the <dfn
8802
- extended-attribute data-lt="Reflect" data-x="xattr-Reflect"><code>[Reflect]</code></dfn>, <dfn
8803
- extended-attribute data-lt="ReflectSetter"
8804
- data-x="xattr-ReflectSetter"><code>[ReflectSetter]</code></dfn>, <dfn extended-attribute
8805
- data-lt="ReflectURL" data-x="xattr-ReflectURL"><code>[ReflectURL]</code></dfn>, <dfn
8806
- extended-attribute data-lt="ReflectNonNegative"
8801
+ <p>To enable improved usage of <span data-x="reflect">reflection</span>, we introduce multiple new
8802
+ IDL <span data-x="extended attribute">extended attributes</span>. <dfn extended-attribute
8803
+ data-lt="Reflect" data-x="xattr-Reflect"><code>[Reflect]</code></dfn>, <dfn extended-attribute
8804
+ data-lt="ReflectSetter" data- x="xattr-ReflectSetter"><code>[ReflectSetter]</code></dfn>, <dfn
8805
+ extended-attribute data-lt="ReflectURL" data-x="xattr-ReflectURL"><code>[ReflectURL]</code></dfn>,
8806
+ <dfn extended-attribute data-lt="ReflectNonNegative"
8807
8807
data-x="xattr-ReflectNonNegative"><code>[ReflectNonNegative]</code></dfn>, <dfn extended-attribute
8808
- data-lt="ReflectPositive" data-x="xattr-ReflectPositive"><code>[ReflectPositive]</code></dfn>,
8808
+ data-lt="ReflectPositive" data-x="xattr-ReflectPositive"><code>[ReflectPositive]</code></dfn>, and
8809
8809
<dfn extended-attribute data-lt="ReflectPositiveWithFallback"
8810
- data-x="xattr-ReflectPositiveWithFallback"><code>[ReflectPositiveWithFallback]</code></dfn>, <dfn
8811
- extended-attribute data-lt="ReflectRange"
8812
- data-x="xattr-ReflectRange"><code>[ReflectRange]</code></dfn>, and <dfn extended-attribute
8813
- data-lt="ReflectDefault" data-x="xattr-ReflectDefault"><code>[ReflectDefault]</code></dfn> IDL
8814
- <span data-x="extended attribute">extended attributes</span>.</p>
8810
+ data-x="xattr-ReflectPositiveWithFallback"><code>[ReflectPositiveWithFallback]</code></dfn> all
8811
+ trigger <span data-x="reflect">reflection</span>. These must either take no arguments, or take a
8812
+ string; they must not appear on anything other than an interface member attribute; and only one of
8813
+ these can be used at a time.</p>
8815
8814
8816
- <p>The <code data-x="xattr-Reflect">[Reflect]</code>, <code
8817
- data-x="xattr-ReflectSetter">[ReflectSetter]</code>, <code
8818
- data-x="xattr-ReflectURL">[ReflectURL]</code>, <code
8819
- data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code>, <code
8820
- data-x="xattr-ReflectPositive">[ReflectPositive]</code>, <code
8821
- data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code> <span>extended
8822
- attribute</span>s must either take no arguments, or take a string. They must not appear on
8823
- anything other than an interface member attribute.</p>
8815
+ <p>For one of these primary reflection <span data-x="extended attribute">extended
8816
+ attributes</span>, its <span>reflected content attribute name</span> is the string value it takes,
8817
+ if one is provided, or the IDL attribute name otherwise.</p>
8824
8818
8825
8819
<p>IDL attributes with the <code data-x="xattr-Reflect">[Reflect]</code> <span>extended
8826
- attribute</span> must <span>reflect</span> the content attribute of the name provided by < code
8827
- data-x="xattr-Reflect">[Reflect]</code> or the IDL attribute name if none is provided .</p>
8820
+ attribute</span> must <span>reflect</span> <code data-x="xattr-Reflect">[Reflect]</ code>'s
8821
+ <span>reflected content attribute name</span> .</p>
8828
8822
8829
8823
<p>IDL attributes with the <code data-x="xattr-ReflectSetter">[ReflectSetter]</code>
8830
- <span>extended attribute</span> on setting must <span>reflect</span> the content attribute of the
8831
- name provided by <code data-x="xattr-ReflectSetter">[ReflectSetter]</code> or the IDL attribute
8832
- name if none is provided.</p>
8824
+ <span>extended attribute</span> on setting must <span>reflect</span> <code
8825
+ data-x="xattr-ReflectSetter">[ReflectSetter]</code>'s <span>reflected content attribute
8826
+ name</span>.</p>
8827
+
8828
+ <p>The <code data-x="xattr-ReflectURL">[ReflectURL]</code> <span>extended attribute</span> must
8829
+ only appear on attributes with a type of <code data-x="idl-USVString">USVString</code>.</p>
8833
8830
8834
8831
<p>IDL attributes with the <code data-x="xattr-ReflectURL">[ReflectURL]</code> <span>extended
8835
- attribute</span> must <span>reflect</span>, <span data-x="treated as a URL">as a URL</span>, the
8836
- content attribute of the name provided by <code data-x="xattr-ReflectURL">[ReflectURL]</code> or
8837
- the IDL attribute name if none is provided.</p>
8832
+ attribute</span> must <span>reflect</span>, <span data-x="treated as a URL">as a URL</span>, <code
8833
+ data-x="xattr-ReflectURL">[ReflectURL]</code>'s <span>reflected content attribute name</span>.</p>
8838
8834
8839
8835
<p>The <code data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code> <span>extended
8840
- attribute</span> must only appear on interface member attributes with a type of <code
8836
+ attribute</span> must only appear on attributes with a type of <code
8841
8837
data-x="idl-long">long</code>.</p>
8842
8838
8843
8839
<p>IDL attributes with the <code data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code>
8844
8840
<span>extended attribute</span> must <span>reflect</span>, <span>limited to only non-negative
8845
- numbers</span>, the content attribute of the name provided by <code
8846
- data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code> or the IDL attribute name if none is
8847
- provided.</p>
8841
+ numbers</span>, <code data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code>'s
8842
+ <span>reflected content attribute name</span>.</p>
8848
8843
8849
8844
<p>The <code data-x="xattr-ReflectPositive">[ReflectPositive]</code> and <code
8850
- data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code> <span>extended
8851
- attribute</span>s must only appear on interface member attributes with a type of <code
8852
- data-x="idl-double">double</code> or <code data-x="idl-unsigned-long">unsigned long</code>.</p>
8845
+ data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code> <span
8846
+ data-x="extended attribute">extended attributes</span> must only appear on attributes with a type
8847
+ of <code data-x="idl-double">double</code> or <code data-x="idl-unsigned-long">unsigned
8848
+ long</code>.</p>
8853
8849
8854
8850
<p>IDL attributes with the <code data-x="xattr-ReflectPositive">[ReflectPositive]</code>
8855
8851
<span>extended attribute</span> must <span>reflect</span>, <span>limited to only positive
8856
- numbers</span>, the content attribute of the name provided by <code
8857
- data-x="xattr-ReflectPositive">[ReflectPositive]</code> or the IDL attribute name if none is
8858
- provided.</p>
8852
+ numbers</span>, <code data-x="xattr-ReflectPositive">[ReflectPositive]</code>'s <span>reflected
8853
+ content attribute name</span>.</p>
8859
8854
8860
8855
<p>IDL attributes with the <code
8861
8856
data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code> <span>extended
8862
8857
attribute</span> must <span>reflect</span>, <span>limited to only positive numbers with
8863
- fallback</span>, the content attribute of the name provided by <code
8864
- data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code> or the IDL
8865
- attribute name if none is provided.</p>
8858
+ fallback</span>, <code
8859
+ data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code>'s <span>reflected
8860
+ content attribute name</span>.</p>
8861
+
8862
+ <hr>
8863
+
8864
+ <p>To supplement the above <span data-x="extended attribute">extended attributes</span> we also
8865
+ introduce <dfn extended-attribute data-lt="ReflectRange"
8866
+ data-x="xattr-ReflectRange"><code>[ReflectRange]</code></dfn>, and <dfn extended-attribute
8867
+ data-lt="ReflectDefault" data-x="xattr-ReflectDefault"><code>[ReflectDefault]</code></dfn>. These
8868
+ augment how <span data-x="reflect">reflection</span> works and also must only appear on interface
8869
+ member attributes.</p>
8866
8870
8867
8871
<p>The <code data-x="xattr-ReflectRange">[ReflectRange]</code> <span>extended attribute</span>
8868
- must take an integer list limited to two values. It must not appear on anything other than an
8869
- interface member attribute with a type of <code data-x="idl-unsigned-long">unsigned long</code>.
8870
- Additionally, it must also only appear alongside <code
8871
- data-x="xattr-Reflect">[Reflect]</code>.</p>
8872
+ must take an integer list limited to two values. It must only be used on attributes with a type of
8873
+ <code data-x="idl-unsigned-long">unsigned long</code>. Additionally, it must also only appear
8874
+ alongside <code data-x="xattr-Reflect">[Reflect]</code>.</p>
8872
8875
8873
8876
<p>IDL attributes with the <code data-x="xattr-ReflectRange">[ReflectRange]</code> <span>extended
8874
8877
attribute</span> are <span>clamped to the range</span> [<var>clampedMin</var>,
@@ -8877,18 +8880,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
8877
8880
data-x="xattr-ReflectRange">[ReflectRange]</code>.</p>
8878
8881
8879
8882
<p>The <code data-x="xattr-ReflectDefault">[ReflectDefault]</code> <span>extended attribute</span>
8880
- must not appear on anything other than an interface member attribute with a type of <code
8881
- data-x="idl-double">double </code>, <code data-x="idl-long">long</code>, or <code
8882
- data-x="idl-unsigned-long">unsigned long </code>. When used on an attribute of type <code
8883
- data-x="idl-double">double</code>, it must take a decimal, otherwise it must take an integer.
8884
- Additionally, it must also only appear alongside <code data-x="xattr-Reflect">[Reflect]</code>,
8885
- <code data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code>, <code
8883
+ must only be used on attributes with a type of <code data-x="idl-double">double</code>, <code
8884
+ data-x="idl-long">long </code>, or <code data-x="idl-unsigned- long">unsigned long</code>. When used
8885
+ on an attribute of type <code data-x="idl-double">double </code>, it must take a decimal; otherwise
8886
+ it must take an integer. Additionally, it must also only appear alongside <code
8887
+ data-x="xattr-Reflect">[Reflect]</code>, <code
8888
+ data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code>, <code
8886
8889
data-x="xattr-ReflectPositive">[ReflectPositive]</code>, or <code
8887
8890
data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code>.</p>
8888
8891
8889
8892
<p>IDL attributes with the <code data-x="xattr-ReflectDefault">[ReflectDefault]</code>
8890
- <span>extended attribute</span> have a <span>default value</span> provided by <code
8891
- data-x="xattr-ReflectDefault">[ReflectDefault]</code>.</p>
8893
+ <span>extended attribute</span> have a <span>default value</span> provided by the argument
8894
+ provided to <code data-x="xattr-ReflectDefault">[ReflectDefault]</code>.</p>
8892
8895
8893
8896
<h4>Using reflect in specifications</h4>
8894
8897
@@ -20308,8 +20311,9 @@ interface <dfn interface>HTMLQuoteElement</dfn> : <span>HTMLElement</span> {
20308
20311
[<span>HTMLConstructor</span>] constructor();
20309
20312
20310
20313
[<span>CEReactions</span>, <span data-x="xattr-ReflectURL">ReflectURL</span>] attribute USVString <dfn attribute for="HTMLQuoteElement" data-x="dom-quote-cite">cite</dfn>;
20311
- };</code></pre> <p class="note">The <code>HTMLQuoteElement</code> interface is also used by the
20312
- <code>q</code> element.</p>
20314
+ };</code></pre>
20315
+ <p class="note">The <code>HTMLQuoteElement</code> interface is also used by the <code>q</code>
20316
+ element.</p>
20313
20317
</dd>
20314
20318
<dd w-dev>Uses <code>HTMLQuoteElement</code>.</dd>
20315
20319
</dl>
@@ -20620,7 +20624,7 @@ interface <dfn interface>HTMLOListElement</dfn> : <span>HTMLElement</span> {
20620
20624
20621
20625
<div w-nodev>
20622
20626
20623
- <p class="note">The <span data-x="xattr-ReflectDefault">[ReflectDefault]</span> means that the
20627
+ <p class="note">Due to <span data-x="xattr-ReflectDefault">[ReflectDefault]</span> the
20624
20628
<code data-x="dom-ol-start">start</code> IDL attribute does not necessarily match the list's <span
20625
20629
data-x="concept-ol-start">starting value</span>, in cases where the <code
20626
20630
data-x="attr-ol-start">start</code> content attribute is omitted and the <code
@@ -29056,8 +29060,8 @@ interface <dfn interface>HTMLSourceElement</dfn> : <span>HTMLElement</span> {
29056
29060
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute USVString <dfn attribute for="HTMLSourceElement" data-x="dom-source-srcset">srcset</dfn>;
29057
29061
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLSourceElement" data-x="dom-source-sizes">sizes</dfn>;
29058
29062
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLSourceElement" data-x="dom-source-media">media</dfn>;
29059
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLIFrameElement,HTMLEmbedElement,HTMLObjectElement, HTMLSourceElement,HTMLVideoElement " data-x="dom-dim -width">width</dfn>;
29060
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLIFrameElement,HTMLEmbedElement,HTMLObjectElement, HTMLSourceElement,HTMLVideoElement " data-x="dom-dim -height">height</dfn>;
29063
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLSourceElement" data-x="dom-source -width">width</dfn>;
29064
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLSourceElement" data-x="dom-source -height">height</dfn>;
29061
29065
};</code></pre>
29062
29066
</dd>
29063
29067
<dd w-dev>Uses <code>HTMLSourceElement</code>.</dd>
@@ -33383,8 +33387,8 @@ interface <dfn interface>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
33383
33387
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>, <span data-x="xattr-Reflect">Reflect</span>] readonly attribute <span>DOMTokenList</span> <dfn attribute for="HTMLIFrameElement" data-x="dom-iframe-sandbox">sandbox</dfn>;
33384
33388
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLIFrameElement" data-x="dom-iframe-allow">allow</dfn>;
33385
33389
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>="<span data-x="attr-iframe-allowfullscreen">allowfullscreen</span>"] attribute boolean <dfn attribute for="HTMLIFrameElement" data-x="dom-iframe-allowFullscreen">allowFullscreen</dfn>;
33386
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <span data-x="dom-dim-width">width</span >;
33387
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <span data-x="dom-dim-height">height</span >;
33390
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLIFrameElement" data-x="dom-dim-width">width</dfn >;
33391
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLIFrameElement" data-x="dom-dim-height">height</dfn >;
33388
33392
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-referrerPolicy">referrerPolicy</span>;
33389
33393
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-loading">loading</span>;
33390
33394
readonly attribute <span>Document</span>? <span data-x="dom-iframe-contentDocument">contentDocument</span>;
@@ -34269,8 +34273,8 @@ interface <dfn interface>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
34269
34273
34270
34274
[<span>CEReactions</span>, <span data-x="xattr-ReflectURL">ReflectURL</span>] attribute USVString <dfn attribute for="HTMLEmbedElement" data-x="dom-embed-src">src</dfn>;
34271
34275
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLEmbedElement" data-x="dom-embed-type">type</dfn>;
34272
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <span data-x="dom-dim -width">width</span >;
34273
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <span data-x="dom-dim -height">height</span >;
34276
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLEmbedElement" data-x="dom-embed -width">width</dfn >;
34277
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLEmbedElement" data-x="dom-embed -height">height</dfn >;
34274
34278
<span>Document</span>? <span data-x="dom-media-getSVGDocument">getSVGDocument</span>();
34275
34279
34276
34280
// <a href="#HTMLEmbedElement-partial">also has obsolete members</a>
@@ -34539,8 +34543,8 @@ interface <dfn interface>HTMLObjectElement</dfn> : <span>HTMLElement</span> {
34539
34543
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLObjectElement" data-x="dom-object-type">type</dfn>;
34540
34544
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLObjectElement" data-x="dom-object-name">name</dfn>;
34541
34545
readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-fae-form">form</span>;
34542
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <span data-x="dom-dim -width">width</span >;
34543
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <span data-x="dom-dim -height">height</span >;
34546
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLObjectElement" data-x="dom-object -width">width</dfn >;
34547
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLObjectElement" data-x="dom-object -height">height</dfn >;
34544
34548
readonly attribute <span>Document</span>? <span data-x="dom-object-contentDocument">contentDocument</span>;
34545
34549
readonly attribute <span>WindowProxy</span>? <span data-x="dom-object-contentWindow">contentWindow</span>;
34546
34550
<span>Document</span>? <span data-x="dom-media-getSVGDocument">getSVGDocument</span>();
@@ -35060,8 +35064,8 @@ interface <dfn interface>HTMLObjectElement</dfn> : <span>HTMLElement</span> {
35060
35064
interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span> {
35061
35065
[<span>HTMLConstructor</span>] constructor();
35062
35066
35063
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <span data-x="dom-dim -width">width</span >;
35064
- [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <span data-x="dom-dim -height">height</span >;
35067
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLVideoElement" data-x="dom-video -width">width</dfn >;
35068
+ [<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLVideoElement" data-x="dom-video -height">height</dfn >;
35065
35069
readonly attribute unsigned long <span data-x="dom-video-videoWidth">videoWidth</span>;
35066
35070
readonly attribute unsigned long <span data-x="dom-video-videoHeight">videoHeight</span>;
35067
35071
[<span>CEReactions</span>, <span data-x="xattr-ReflectURL">ReflectURL</span>] attribute USVString <dfn attribute for="HTMLVideoElement" data-x="dom-video-poster">poster</dfn>;
0 commit comments