@@ -11,7 +11,9 @@ Complain About: accidental-2119 no
11
11
</pre>
12
12
13
13
<pre class="link-defaults">
14
- spec: infra; type: dfn; text: list
14
+ spec: infra; type: dfn;
15
+ text: code unit
16
+ text: list
15
17
spec: ecmascript; type: dfn;
16
18
for: ECMAScript;
17
19
text: constructor
@@ -2095,17 +2097,15 @@ the value is the IDL {{undefined}} value.
2095
2097
1. Depending on the type of the argument:
2096
2098
<dl class="switch">
2097
2099
: {{DOMString}}
2100
+ : {{USVString}}
2098
2101
: an [=enumeration=] type
2099
2102
:: The value of the <emu-t class="regex"><a href="#prod-string">string</a></emu-t> token
2100
- is the sequence of 16 bit unsigned integer code units
2101
- (hereafter referred to just as <dfn id="dfn-code-unit">code units</dfn>)
2102
- corresponding to the UTF-16 encoding of |S|.
2103
+ is |S|.
2103
2104
: {{ByteString}}
2104
- :: The value of the <emu-t class="regex"><a href="#prod-string">string</a></emu-t> token
2105
- is the sequence of 8 bit unsigned integer code units
2106
- corresponding to the UTF-8 encoding of |S|.
2107
- : {{USVString}}
2108
- :: The value of the <emu-t class="regex"><a href="#prod-string">string</a></emu-t> token is |S|.
2105
+ :: Assert: |S| doesn't contain any [=code points=] higher than U+00FF.
2106
+
2107
+ The value of the <emu-t class="regex"><a href="#prod-string">string</a></emu-t> token
2108
+ is the [=isomorphic encoding=] of |S|.
2109
2109
</dl>
2110
2110
</div>
2111
2111
@@ -5436,7 +5436,8 @@ allows authors to register callbacks by providing objects that implement the
5436
5436
5437
5437
<h3 id="idl-types">Types</h3>
5438
5438
5439
- This section lists the types supported by Web IDL, the set of values
5439
+ This section lists the types supported by Web IDL,
5440
+ the set of values or [[Infra|Infra]] type
5440
5441
corresponding to each type, and how [=constants=]
5441
5442
of that type are represented.
5442
5443
@@ -5791,10 +5792,7 @@ The {{bigint}} type is an arbitrary integer type, unrestricted in range.
5791
5792
5792
5793
<h4 oldids="dom-DOMString" id="idl-DOMString" interface>DOMString</h4>
5793
5794
5794
- The {{DOMString}} type corresponds to
5795
- the set of all possible sequences of [=code units=].
5796
- Such sequences are commonly interpreted as UTF-16 encoded strings [[!RFC2781]]
5797
- although this is not required.
5795
+ The {{DOMString}} type corresponds to [=strings=].
5798
5796
5799
5797
Note: Note also that <emu-val>null</emu-val>
5800
5798
is not a value of type {{DOMString}}.
@@ -5818,7 +5816,7 @@ can be set to [=value of string literal tokens|the value=] of a
5818
5816
<h4 oldids="dom-ByteString" id="idl-ByteString" interface>ByteString</h4>
5819
5817
5820
5818
The {{ByteString}} type
5821
- corresponds to the set of all possible sequences of bytes .
5819
+ corresponds to [=byte sequences=] .
5822
5820
Such sequences might be interpreted as UTF-8 encoded strings [[!RFC3629]]
5823
5821
or strings in some other 8-bit-per-code-unit encoding, although this is not required.
5824
5822
@@ -5845,10 +5843,10 @@ can be set to [=value of string literal tokens|the value=] of a
5845
5843
<h4 oldids="dom-USVString" id="idl-USVString" interface>USVString</h4>
5846
5844
5847
5845
The {{USVString}} type
5848
- corresponds to the set of all possible sequences of
5849
- [=scalar values=] ,
5850
- which are all of the Unicode code points apart from the
5851
- surrogate code points .
5846
+ corresponds to [=scalar value strings=].
5847
+ Depending on the context ,
5848
+ these can be treated as sequences of either 16-bit unsigned integer [=code units=]
5849
+ or [=scalar values=] .
5852
5850
5853
5851
There is no way to represent a constant {{USVString}}
5854
5852
value in IDL, although {{USVString}} [=dictionary member=] [=dictionary member/default values=]
@@ -7471,12 +7469,9 @@ value when its bit pattern is interpreted as an unsigned 64 bit integer.
7471
7469
7472
7470
<div id="USVString-to-es" algorithm="convert an USVString to an ECMAScript value">
7473
7471
7474
- An IDL {{USVString}} value is [=converted to an ECMAScript value|converted=]
7475
- to an ECMAScript value by running the following algorithm:
7476
-
7477
- 1. Let |scalarValues| be the sequence of [=scalar values=] the {{USVString}} represents.
7478
- 1. Let |string| be the sequence of [=code units=] that results from encoding |scalarValues| in UTF-16.
7479
- 1. Return the String value that represents the same sequence of [=code units=] as |string|.
7472
+ The result of [=converted to an ECMAScript value|converting=]
7473
+ an IDL {{USVString}} value |S| to an ECMAScript
7474
+ value is |S|.
7480
7475
</div>
7481
7476
7482
7477
0 commit comments