Skip to content

Commit ad88237

Browse files
annevkdomenic
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 #3183.
1 parent 2757de3 commit ad88237

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
@@ -77841,7 +77841,7 @@ console.assert(iframeWindow.frameElement === null);
7784177841

7784277842
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
7784377843
[[Value]]: <var>value</var>,
77844-
[[Enumerable]]: true,
77844+
[[Enumerable]]: false,
7784577845
[[Writable]]: false,
7784677846
[[Configurable]]: true }.</p></li>
7784777847
</ol>
@@ -77868,7 +77868,7 @@ console.assert(iframeWindow.frameElement === null);
7786877868
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
7786977869
[[Get]]: <var>crossOriginGet</var>,
7787077870
[[Set]]: <var>crossOriginSet</var>,
77871-
[[Enumerable]]: true,
77871+
[[Enumerable]]: false,
7787277872
[[Configurable]]: true }.</p></li>
7787377873
</ol>
7787477874
</li>
@@ -77894,6 +77894,10 @@ console.assert(iframeWindow.frameElement === null);
7789477894
elsewhere in this specification for cases where we are not able to preserve these invariants, for
7789577895
compatibility with existing Web content.) <ref spec=JAVASCRIPT></p>
7789677896

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

7789977903
<ol>
@@ -79076,11 +79080,17 @@ interface <dfn>BarProp</dfn> {
7907679080
<li><p>Let <var>value</var> be the <code>WindowProxy</code> object of the
7907779081
<span data-x="dom-window-nameditem-filter">named object</span> with the name <var>P</var>.
7907879082

79079-
<li><p>Return <span>PropertyDescriptor</span>{
79080-
[[Value]]: <var>value</var>,
79081-
[[Enumerable]]: true,
79082-
[[Writable]]: false,
79083-
[[Configurable]]: true }.</p></li>
79083+
<li>
79084+
<p>Return <span>PropertyDescriptor</span>{
79085+
[[Value]]: <var>value</var>,
79086+
[[Enumerable]]: false,
79087+
[[Writable]]: false,
79088+
[[Configurable]]: true }.</p>
79089+
79090+
<p class="note">The reason the property descriptors are non-enumerable, despite this
79091+
mismatching the same-origin behavior, is for compatibility with existing Web content. See <a
79092+
href="https://github.com/whatwg/html/issues/3183">issue #3183</a> for details.</p>
79093+
</li>
7908479094
</ol>
7908579095

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

0 commit comments

Comments
 (0)