Skip to content

Commit 27f948a

Browse files
Editorial: replace uses of the Type macro with is-a tests
Follows tc39/ecma262#2874 and tc39/ecma262#3420.
1 parent d777381 commit 27f948a

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

source

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,7 +2996,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29962996
<li>The <dfn data-x="js-prod-Pattern" data-x-href="https://tc39.es/ecma262/#prod-Pattern"><i>Pattern</i></dfn> production</li>
29972997
<li>The <dfn data-x="js-prod-Script" data-x-href="https://tc39.es/ecma262/#prod-Script"><i>Script</i></dfn> production</li>
29982998

2999-
<li>The <dfn data-x="js-Type" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values">Type</dfn> notation</li>
2999+
<li>The
3000+
<dfn data-x="js-BigInt" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-bigint-type">BigInt</dfn>,
3001+
<dfn data-x="js-Boolean" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-boolean-type">Boolean</dfn>,
3002+
<dfn data-x="js-Number" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-number-type">Number</dfn>,
3003+
<dfn data-x="js-String" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-string-type">String</dfn>,
3004+
<dfn data-x="js-Symbol" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-symbol-type">Symbol</dfn>,
3005+
and <dfn data-x="js-Object" data-x-href="https://tc39.es/ecma262/#sec-object-type">Object</dfn> ECMAScript language types</li>
30003006
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-completion-record-specification-type">Completion Record</dfn> specification type</li>
30013007
<li>The <dfn data-x="js-List" data-x-href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</dfn> and
30023008
<dfn data-x-href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</dfn> specification types</li>
@@ -9653,11 +9659,12 @@ interface <dfn interface>DOMStringList</dfn> {
96539659

96549660
<li><p>Let <var>deep</var> be false.</p></li>
96559661

9656-
<li><p>If <span data-x="js-Type">Type</span>(<var>value</var>) is Undefined, Null, Boolean,
9657-
Number, BigInt, or String, then return { [[Type]]: "primitive",
9658-
[[Value]]: <var>value</var> }.</p></li>
9662+
<li><p>If <var>value</var> is undefined, null, <span data-x="js-Boolean">a Boolean</span>, <span
9663+
data-x="js-Number">a Number</span>, <span data-x="js-BigInt">a BigInt</span>, or <span
9664+
data-x="js-String">a String</span>, then return { [[Type]]: "primitive", [[Value]]:
9665+
<var>value</var> }.</p></li>
96599666

9660-
<li><p>If <span data-x="js-Type">Type</span>(<var>value</var>) is Symbol, then throw a
9667+
<li><p>If <var>value</var> <span data-x="js-Symbol">is a Symbol</span>, then throw a
96619668
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>
96629669

96639670
<li><p>Let <var>serialized</var> be an uninitialized value.</p></li>
@@ -12157,7 +12164,7 @@ document.createElement("bad-1"); // (2)</code></pre>
1215712164
"prototype").</p></li>
1215812165

1215912166
<li>
12160-
<p>If <span data-x="js-Type">Type</span>(<var>prototype</var>) is not Object, then:</p>
12167+
<p>If <var>prototype</var> <span data-x="js-Object">is not an Object</span>, then:</p>
1216112168

1216212169
<ol>
1216312170
<li><p>Let <var>realm</var> be ? <span>GetFunctionRealm</span>(<span>NewTarget</span>).</p></li>
@@ -71432,10 +71439,10 @@ interface <dfn interface>OffscreenCanvasRenderingContext2D</dfn> {
7143271439

7143371440
<p>If <var>type</var> is an image format that supports variable quality (such as
7143471441
"<code>image/jpeg</code>"), <var>quality</var> is given, and <var>type</var> is not
71435-
"<code>image/png</code>", then, if <span data-x="js-Type">Type</span>(<var>quality</var>) is
71436-
Number, and <var>quality</var> is in the range 0.0 to 1.0 inclusive, the user agent must treat
71437-
<var>quality</var> as the desired quality level. Otherwise, the user agent must use its default
71438-
quality value, as if the <var>quality</var> argument had not been given.</p>
71442+
"<code>image/png</code>", then, if <var>quality</var> <span data-x="js-Number">is a Number</span>
71443+
in the range 0.0 to 1.0 inclusive, the user agent must treat <var>quality</var> as the desired
71444+
quality level. Otherwise, the user agent must use its default quality value, as if the
71445+
<var>quality</var> argument had not been given.</p>
7143971446

7144071447
<p class="note">The use of type-testing here, instead of simply declaring <var>quality</var> as
7144171448
a Web IDL <code data-x="">double</code>, is a historical artifact.</p>
@@ -72658,7 +72665,7 @@ dictionary <dfn dictionary>ElementDefinitionOptions</dfn> {
7265872665
<li><p>Let <var>prototype</var> be ? <span data-x="js-Get">Get</span>(<var>constructor</var>,
7265972666
"prototype").</p></li>
7266072667

72661-
<li><p>If <span data-x="js-Type">Type</span>(<var>prototype</var>) is not Object, then throw a
72668+
<li><p>If <var>prototype</var> <span data-x="js-Object">is not an Object</span>, then throw a
7266272669
<code>TypeError</code> exception.</p></li>
7266372670

7266472671
<li><p>Let <var>lifecycleCallbacks</var> be a map with the keys "<code
@@ -145431,6 +145438,7 @@ INSERT INTERFACES HERE
145431145438
Michael Day,
145432145439
Michael Dyck,
145433145440
Michael Enright,
145441+
Michael Ficarra,
145434145442
Michael Gratton,
145435145443
Michael Kohler,
145436145444
Michael McKelvey,

0 commit comments

Comments
 (0)