Skip to content

Commit

Permalink
Enumerate fewer cross-origin properties
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
annevk authored and domenic committed Nov 6, 2017
1 parent 2757de3 commit ad88237
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions source
Expand Up @@ -77841,7 +77841,7 @@ console.assert(iframeWindow.frameElement === null);

<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
[[Value]]: <var>value</var>,
[[Enumerable]]: true,
[[Enumerable]]: false,
[[Writable]]: false,
[[Configurable]]: true }.</p></li>
</ol>
Expand All @@ -77868,7 +77868,7 @@ console.assert(iframeWindow.frameElement === null);
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
[[Get]]: <var>crossOriginGet</var>,
[[Set]]: <var>crossOriginSet</var>,
[[Enumerable]]: true,
[[Enumerable]]: false,
[[Configurable]]: true }.</p></li>
</ol>
</li>
Expand All @@ -77894,6 +77894,10 @@ console.assert(iframeWindow.frameElement === null);
elsewhere in this specification for cases where we are not able to preserve these invariants, for
compatibility with existing Web content.) <ref spec=JAVASCRIPT></p>

<p class="note">The reason the property descriptors are non-enumerable, despite this mismatching
the same-origin behavior, is for compatibility with existing Web content. See <a
href="https://github.com/whatwg/html/issues/3183">issue #3183</a> for details.</p>

<h5><dfn>CrossOriginGet</dfn> ( <var>O</var>, <var>P</var>, <var>Receiver</var> )</h5>

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

<li><p>Return <span>PropertyDescriptor</span>{
[[Value]]: <var>value</var>,
[[Enumerable]]: true,
[[Writable]]: false,
[[Configurable]]: true }.</p></li>
<li>
<p>Return <span>PropertyDescriptor</span>{
[[Value]]: <var>value</var>,
[[Enumerable]]: false,
[[Writable]]: false,
[[Configurable]]: true }.</p>

<p class="note">The reason the property descriptors are non-enumerable, despite this
mismatching the same-origin behavior, is for compatibility with existing Web content. See <a
href="https://github.com/whatwg/html/issues/3183">issue #3183</a> for details.</p>
</li>
</ol>

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

0 comments on commit ad88237

Please sign in to comment.