Skip to content

Commit 773cd97

Browse files
authoredJul 2, 2024··
Update @@foo symbol notation to %Symbol.foo% notation
Follows tc39/ecma262#1314.
1 parent 5d422cc commit 773cd97

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
 

‎source

+10-10
Original file line numberDiff line numberDiff line change
@@ -2951,10 +2951,10 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29512951
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-abstract-closure">abstract closure</dfn></li>
29522952
<li><dfn data-x-href="https://tc39.es/ecma262/#immutable-prototype-exotic-object">immutable prototype exotic object</dfn></li>
29532953
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-well-known-symbols">Well-Known Symbols</dfn>, including
2954-
<dfn>@@hasInstance</dfn>,
2955-
<dfn>@@isConcatSpreadable</dfn>,
2956-
<dfn>@@toPrimitive</dfn>, and
2957-
<dfn>@@toStringTag</dfn></li>
2954+
<dfn>%Symbol.hasInstance%</dfn>,
2955+
<dfn>%Symbol.isConcatSpreadable%</dfn>,
2956+
<dfn>%Symbol.toPrimitive%</dfn>, and
2957+
<dfn>%Symbol.toStringTag%</dfn></li>
29582958
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-well-known-intrinsic-objects">Well-Known Intrinsic Objects</dfn>, including
29592959
<dfn data-x-href="https://tc39.es/ecma262/#sec-properties-of-the-array-prototype-object">%Array.prototype%</dfn>,
29602960
<dfn data-x-href="https://tc39.es/ecma262/#sec-properties-of-the-error-prototype-object">%Error.prototype%</dfn>,
@@ -88729,8 +88729,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8872988729
<h6><dfn>CrossOriginPropertyFallback</dfn> ( <var>P</var> )</h6>
8873088730

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

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

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

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.