Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @@foo symbol notation to %Symbol.foo% notation #10450

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -88732,8 +88732,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 @@ -88911,7 +88911,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 @@ -90415,7 +90415,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 @@ -90427,12 +90427,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