Skip to content

Commit

Permalink
Update @@foo symbol notation to %Symbol.foo% notation
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb authored Jul 2, 2024
1 parent 5d422cc commit 773cd97
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2951,10 +2951,10 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-abstract-closure">abstract closure</dfn></li>
<li><dfn data-x-href="https://tc39.es/ecma262/#immutable-prototype-exotic-object">immutable prototype exotic object</dfn></li>
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-well-known-symbols">Well-Known Symbols</dfn>, including
<dfn>@@hasInstance</dfn>,
<dfn>@@isConcatSpreadable</dfn>,
<dfn>@@toPrimitive</dfn>, and
<dfn>@@toStringTag</dfn></li>
<dfn>%Symbol.hasInstance%</dfn>,
<dfn>%Symbol.isConcatSpreadable%</dfn>,
<dfn>%Symbol.toPrimitive%</dfn>, and
<dfn>%Symbol.toStringTag%</dfn></li>
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-well-known-intrinsic-objects">Well-Known Intrinsic Objects</dfn>, including
<dfn data-x-href="https://tc39.es/ecma262/#sec-properties-of-the-array-prototype-object">%Array.prototype%</dfn>,
<dfn data-x-href="https://tc39.es/ecma262/#sec-properties-of-the-error-prototype-object">%Error.prototype%</dfn>,
Expand Down Expand Up @@ -88729,8 +88729,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<h6><dfn>CrossOriginPropertyFallback</dfn> ( <var>P</var> )</h6>

<ol>
<li><p>If <var>P</var> is "<code data-x="">then</code>", <span>@@toStringTag</span>,
<span>@@hasInstance</span>, or <span>@@isConcatSpreadable</span>, then return
<li><p>If <var>P</var> is "<code data-x="">then</code>", <span>%Symbol.toStringTag%</span>,
<span>%Symbol.hasInstance%</span>, or <span>%Symbol.isConcatSpreadable%</span>, then return
<span>PropertyDescriptor</span>{
[[Value]]: undefined,
[[Writable]]: false,
Expand Down Expand Up @@ -88908,7 +88908,7 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
data-x="list append">append</span> <var>e</var>.[[Property]] to <var>keys</var>.</p></li>

<li><p>Return the concatenation of <var>keys</var> and « "<code data-x="">then</code>",
<span>@@toStringTag</span>, <span>@@hasInstance</span>, <span>@@isConcatSpreadable</span>
<span>%Symbol.toStringTag%</span>, <span>%Symbol.hasInstance%</span>, <span>%Symbol.isConcatSpreadable%</span>
».</p></li>
</ol>

Expand Down Expand Up @@ -90412,7 +90412,7 @@ interface <dfn interface>BarProp</dfn> {
[[Enumerable]]: false,
[[Configurable]]: false }).</p></li>

<li><p>Perform ! <var>location</var>.[[DefineOwnProperty]](<span>@@toPrimitive</span>, {
<li><p>Perform ! <var>location</var>.[[DefineOwnProperty]](<span>%Symbol.toPrimitive%</span>, {
[[Value]]: undefined,
[[Writable]]: false,
[[Enumerable]]: false,
Expand All @@ -90424,12 +90424,12 @@ interface <dfn interface>BarProp</dfn> {
<li><p>Return <var>location</var>.</p></li>
</ol>

<p class="note">The addition of <code data-x="">valueOf</code> and <span>@@toPrimitive</span> own
<p class="note">The addition of <code data-x="">valueOf</code> and <span>%Symbol.toPrimitive%</span> own
data properties, as well as the fact that all of <code>Location</code>'s IDL attributes are marked
<code data-x="">[<span>LegacyUnforgeable</span>]</code>, is required by legacy code that consulted
the <code>Location</code> interface, or stringified it, to determine the <span
data-x="concept-document-url">document URL</span>, and then used it in a security-sensitive way.
In particular, the <code data-x="">valueOf</code>, <span>@@toPrimitive</span>, and <code
In particular, the <code data-x="">valueOf</code>, <span>%Symbol.toPrimitive%</span>, and <code
data-x="">[<span>LegacyUnforgeable</span>]</code> stringifier mitigations ensure that code such as
<code data-x="">foo[location] = bar</code> or <code data-x="">location + ""</code> cannot be
misdirected.</p>
Expand Down

0 comments on commit 773cd97

Please sign in to comment.