[heycam/webidl] Named properties object: enumerate supported properties in [[OwnPropertyKeys]] (#964)

Currently, Gecko implements proposed `[[OwnPropertyKeys]]` semantics, but Blink and WebKit do not.

This PR feels like an expected behavior and aligns [named properties object](https://heycam.github.io/webidl/#named-properties-object) with [legacy platform objects](https://heycam.github.io/webidl/#legacy-platform-object-ownpropertykeys) on enumerating supported property names.

Since only `Window` has  [named properties object](https://heycam.github.io/webidl/#named-properties-object), and it also has a [`LegacyUnenumerableNamedProperties`](https://heycam.github.io/webidl/#LegacyUnenumerableNamedProperties) extended attribute, this change has no performance impact on `for (var k in window) {}`.

If this is feasible to implement in Blink, I will contribute extensive WPT coverage and author a patch for WebKit. Once #963 and `[[OwnPropertyKeys]]` discrepancies are resolved, `WindowProperties` will be 100% compatible across all implementations!
You can view, comment on, or merge this pull request online at:

  https://github.com/heycam/webidl/pull/964

-- Commit Summary --

  * Named properties object: enumerate supported properties in [[OwnPropertyKeys]]

-- File Changes --

    M index.bs (19)

-- Patch Links --

https://github.com/heycam/webidl/pull/964.patch
https://github.com/heycam/webidl/pull/964.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/964

Received on Thursday, 11 March 2021 02:04:04 UTC