Skip to content

Commit

Permalink
add links to ECMA-262 for JS types
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Oct 26, 2024
1 parent c8260e5 commit 76079f8
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2996,6 +2996,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>The <dfn data-x="js-prod-Pattern" data-x-href="https://tc39.es/ecma262/#prod-Pattern"><i>Pattern</i></dfn> production</li>
<li>The <dfn data-x="js-prod-Script" data-x-href="https://tc39.es/ecma262/#prod-Script"><i>Script</i></dfn> production</li>

<li>The
<dfn data-x="js-BigInt" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-bigint-type">BigInt</dfn>,
<dfn data-x="js-Boolean" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-boolean-type">Boolean</dfn>,
<dfn data-x="js-Number" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-number-type">Number</dfn>,
<dfn data-x="js-String" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-string-type">String</dfn>,
<dfn data-x="js-Symbol" data-x-href="https://tc39.es/ecma262/#sec-ecmascript-language-types-symbol-type">Symbol</dfn>,
and <dfn data-x="js-Object" data-x-href="https://tc39.es/ecma262/#sec-object-type">Object</dfn> ECMAScript language types</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-completion-record-specification-type">Completion Record</dfn> specification type</li>
<li>The <dfn data-x="js-List" data-x-href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</dfn> and
<dfn data-x-href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</dfn> specification types</li>
Expand Down Expand Up @@ -9558,11 +9565,13 @@ interface <dfn interface>DOMStringList</dfn> {

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

<li><p>If <var>value</var> is undefined, null, a Boolean, a Number, a BigInt, or a String, then
return { [[Type]]: "primitive", [[Value]]: <var>value</var> }.</p></li>
<li><p>If <var>value</var> is undefined, null, <span data-x="js-Boolean">a Boolean</span>, <span
data-x="js-Number">a Number</span>, <span data-x="js-BigInt">a BigInt</span>, or <span
data-x="js-String">a String</span>, then return { [[Type]]: "primitive", [[Value]]:
<var>value</var> }.</p></li>

<li><p>If <var>value</var> is a Symbol, then throw a <span>"<code>DataCloneError</code>"</span>
<code>DOMException</code>.</p></li>
<li><p>If <var>value</var> <span data-x="js-Symbol">is a Symbol</span>, then throw a
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Let <var>serialized</var> be an uninitialized value.</p></li>

Expand Down Expand Up @@ -12061,7 +12070,7 @@ document.createElement("bad-1"); // (2)</code></pre>
"prototype").</p></li>

<li>
<p>If <var>prototype</var> is not an Object, then:</p>
<p>If <var>prototype</var> <span data-x="js-Object">is not an Object</span>, then:</p>

<ol>
<li><p>Let <var>realm</var> be ? <span>GetFunctionRealm</span>(<span>NewTarget</span>).</p></li>
Expand Down Expand Up @@ -71118,10 +71127,10 @@ interface <dfn interface>OffscreenCanvasRenderingContext2D</dfn> {

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

<p class="note">The use of type-testing here, instead of simply declaring <var>quality</var> as
a Web IDL <code data-x="">double</code>, is a historical artifact.</p>
Expand Down Expand Up @@ -72344,8 +72353,8 @@ dictionary <dfn dictionary>ElementDefinitionOptions</dfn> {
<li><p>Let <var>prototype</var> be ? <span data-x="js-Get">Get</span>(<var>constructor</var>,
"prototype").</p></li>

<li><p>If <var>prototype</var> is not an Object, then throw a <code>TypeError</code>
exception.</p></li>
<li><p>If <var>prototype</var> <span data-x="js-Object">is not an Object</span>, then throw a
<code>TypeError</code> exception.</p></li>

<li><p>Let <var>lifecycleCallbacks</var> be a map with the keys "<code
data-x="">connectedCallback</code>", "<code data-x="">disconnectedCallback</code>", "<code
Expand Down

0 comments on commit 76079f8

Please sign in to comment.