Skip to content

Commit 5091805

Browse files
annevkAlice Boxhall
authored andcommitted
Enumerate fewer cross-origin properties
In 205659f we made all properties on cross-origin objects enumerable, equivalent to their same-origin object counterparts. However, this turned out not be web-compatible. This makes them non-enumerable again with the exception of array index property names, which need to be enumerable. Tests: web-platform-tests/wpt#8045 Fixes whatwg#3183.
1 parent 2bedb70 commit 5091805

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

source

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77856,7 +77856,7 @@ console.assert(iframeWindow.frameElement === null);
7785677856

7785777857
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
7785877858
[[Value]]: <var>value</var>,
77859-
[[Enumerable]]: true,
77859+
[[Enumerable]]: false,
7786077860
[[Writable]]: false,
7786177861
[[Configurable]]: true }.</p></li>
7786277862
</ol>
@@ -77883,7 +77883,7 @@ console.assert(iframeWindow.frameElement === null);
7788377883
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
7788477884
[[Get]]: <var>crossOriginGet</var>,
7788577885
[[Set]]: <var>crossOriginSet</var>,
77886-
[[Enumerable]]: true,
77886+
[[Enumerable]]: false,
7788777887
[[Configurable]]: true }.</p></li>
7788877888
</ol>
7788977889
</li>
@@ -77909,6 +77909,10 @@ console.assert(iframeWindow.frameElement === null);
7790977909
elsewhere in this specification for cases where we are not able to preserve these invariants, for
7791077910
compatibility with existing Web content.) <ref spec=JAVASCRIPT></p>
7791177911

77912+
<p class="note">The reason the property descriptors are non-enumerable, despite this mismatching
77913+
the same-origin behavior, is for compatibility with existing Web content. See <a
77914+
href="https://github.com/whatwg/html/issues/3183">issue #3183</a> for details.</p>
77915+
7791277916
<h5><dfn>CrossOriginGet</dfn> ( <var>O</var>, <var>P</var>, <var>Receiver</var> )</h5>
7791377917

7791477918
<ol>
@@ -79091,11 +79095,17 @@ interface <dfn>BarProp</dfn> {
7909179095
<li><p>Let <var>value</var> be the <code>WindowProxy</code> object of the
7909279096
<span data-x="dom-window-nameditem-filter">named object</span> with the name <var>P</var>.
7909379097

79094-
<li><p>Return <span>PropertyDescriptor</span>{
79095-
[[Value]]: <var>value</var>,
79096-
[[Enumerable]]: true,
79097-
[[Writable]]: false,
79098-
[[Configurable]]: true }.</p></li>
79098+
<li>
79099+
<p>Return <span>PropertyDescriptor</span>{
79100+
[[Value]]: <var>value</var>,
79101+
[[Enumerable]]: false,
79102+
[[Writable]]: false,
79103+
[[Configurable]]: true }.</p>
79104+
79105+
<p class="note">The reason the property descriptors are non-enumerable, despite this
79106+
mismatching the same-origin behavior, is for compatibility with existing Web content. See <a
79107+
href="https://github.com/whatwg/html/issues/3183">issue #3183</a> for details.</p>
79108+
</li>
7909979109
</ol>
7910079110

7910179111
<li><p>Throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>

0 commit comments

Comments
 (0)