Skip to content

Commit 6bccbca

Browse files
authored
Allow to use LegacyNullToEmptyString on USVString
This is needed for the CSSOM spec, as that allows to use USVString as the underlying string type. See w3c/csswg-drafts#5010.
1 parent 02abd62 commit 6bccbca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10377,13 +10377,13 @@ for the specific requirements that the use of
1037710377

1037810378
<h4 id="LegacyNullToEmptyString" extended-attribute lt="LegacyNullToEmptyString" oldids="TreatNullAs">[LegacyNullToEmptyString]</h4>
1037910379

10380-
If the [{{LegacyNullToEmptyString}}] [=extended attribute=] appears on the {{DOMString}} type, it creates a new
10381-
IDL type such that that when an ECMAScript <emu-val>null</emu-val> is converted to the IDL type, it
10382-
will be handled differently from its default handling. Instead of being stringified to
10380+
If the [{{LegacyNullToEmptyString}}] [=extended attribute=] appears on the {{DOMString}} or {{USVString}} type,
10381+
it creates a new IDL type such that that when an ECMAScript <emu-val>null</emu-val> is converted to the IDL type,
10382+
it will be handled differently from its default handling. Instead of being stringified to
1038310383
"<code>null</code>", which is the default, it will be converted to the empty string.
1038410384

1038510385
The [{{LegacyNullToEmptyString}}] extended attribute must not be
10386-
[=extended attribute associated with|associated with=] a type that is not {{DOMString}}.
10386+
[=extended attribute associated with|associated with=] a type that is not {{DOMString}} or {{USVString}}.
1038710387

1038810388
Note: This means that even <code class="idl">DOMString?</code> must not use [{{LegacyNullToEmptyString}}], since
1038910389
<emu-val>null</emu-val> is a valid value of that type.

0 commit comments

Comments
 (0)