@@ -6549,7 +6549,7 @@ The following extended attributes are <dfn for="extended attributes">applicable
6549
6549
[{{AllowShared}}],
6550
6550
[{{Clamp}}],
6551
6551
[{{EnforceRange}}], and
6552
- [{{TreatNullAs }}].
6552
+ [{{LegacyNullToEmptyString }}].
6553
6553
6554
6554
<div algorithm>
6555
6555
The <dfn for="IDL type" lt="extended attribute associated with|extended attributes associated with">extended attributes associated with</dfn>
@@ -7735,7 +7735,7 @@ value when its bit pattern is interpreted as an unsigned 64 bit integer.
7735
7735
to an IDL {{DOMString}} value by running the following algorithm:
7736
7736
7737
7737
1. If |V| is <emu-val>null</emu-val> and the conversion is to an IDL type
7738
- [=extended attribute associated with|associated with=] the [{{TreatNullAs }}] extended
7738
+ [=extended attribute associated with|associated with=] the [{{LegacyNullToEmptyString }}] extended
7739
7739
attribute, then return the {{DOMString}} value that represents the empty string.
7740
7740
1. Let |x| be <a abstract-op>ToString</a>(|V|).
7741
7741
1. Return the IDL {{DOMString}} value that represents the same sequence of code units as the one the ECMAScript String value |x| represents.
@@ -10715,34 +10715,31 @@ for the specific requirements that the use of
10715
10715
</div>
10716
10716
10717
10717
10718
- <h4 id="TreatNullAs " extended-attribute lt="TreatNullAs">[TreatNullAs ]</h4>
10718
+ <h4 id="LegacyNullToEmptyString " extended-attribute lt="LegacyNullToEmptyString" oldids=" TreatNullAs">[LegacyNullToEmptyString ]</h4>
10719
10719
10720
10720
<p class="advisement">
10721
- The [{{TreatNullAs }}] [=extended attribute=] is an undesirable feature.
10721
+ The [{{LegacyNullToEmptyString }}] [=extended attribute=] is an undesirable feature.
10722
10722
It exists only so that legacy Web platform features can be specified.
10723
10723
It should not be used in specifications
10724
10724
unless required to specify the behavior of legacy APIs,
10725
10725
or for consistency with these APIs.
10726
10726
Editors who wish to use this feature are strongly advised to discuss this
10727
- by <a href="https://github.com/heycam/webidl/issues/new?title=Intent%20to%20use%20[TreatNullAs ]">filing an issue</a>
10727
+ by <a href="https://github.com/heycam/webidl/issues/new?title=Intent%20to%20use%20[LegacyNullToEmptyString ]">filing an issue</a>
10728
10728
before proceeding.
10729
10729
</div>
10730
10730
10731
- If the [{{TreatNullAs }}] [=extended attribute=] appears on the {{DOMString}} type, it creates a new
10731
+ If the [{{LegacyNullToEmptyString }}] [=extended attribute=] appears on the {{DOMString}} type, it creates a new
10732
10732
IDL type such that that when an ECMAScript <emu-val>null</emu-val> is converted to the IDL type, it
10733
10733
will be handled differently from its default handling. Instead of being stringified to
10734
10734
"<code>null</code>", which is the default, it will be converted to the empty string.
10735
10735
10736
- The [{{TreatNullAs}}] extended attribute must [=takes an identifier|take the identifier=]
10737
- <code>EmptyString</code>.
10738
-
10739
- The [{{TreatNullAs}}] extended attribute must not be
10736
+ The [{{LegacyNullToEmptyString}}] extended attribute must not be
10740
10737
[=extended attribute associated with|associated with=] a type that is not {{DOMString}}.
10741
10738
10742
- Note: This means that even <code class="idl">DOMString?</code> must not use [{{TreatNullAs }}], since
10739
+ Note: This means that even <code class="idl">DOMString?</code> must not use [{{LegacyNullToEmptyString }}], since
10743
10740
<emu-val>null</emu-val> is a valid value of that type.
10744
10741
10745
- See [[#es-DOMString]] for the specific requirements that the use of [{{TreatNullAs }}] entails.
10742
+ See [[#es-DOMString]] for the specific requirements that the use of [{{LegacyNullToEmptyString }}] entails.
10746
10743
10747
10744
<div class="example">
10748
10745
The following [=IDL fragment=] defines an interface that has one attribute whose type has the
@@ -10752,9 +10749,9 @@ See [[#es-DOMString]] for the specific requirements that the use of [{{TreatNull
10752
10749
[Exposed=Window]
10753
10750
interface Dog {
10754
10751
attribute DOMString name;
10755
- attribute [TreatNullAs=EmptyString ] DOMString owner;
10752
+ attribute [LegacyNullToEmptyString ] DOMString owner;
10756
10753
10757
- boolean isMemberOfBreed([TreatNullAs=EmptyString ] DOMString breedName);
10754
+ boolean isMemberOfBreed([LegacyNullToEmptyString ] DOMString breedName);
10758
10755
};
10759
10756
</pre>
10760
10757
0 commit comments