Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify #named-properties-object #1285

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Conversation

delan
Copy link
Contributor

@delan delan commented Mar 28, 2023

This patch clarifies #named-properties-object per whatwg/html#9068 by adding a note that reads

The [[OwnPropertyKeys]] internal method of a named properties object continues to use OrdinaryOwnPropertyKeys, unlike the counterpart for legacy platform objects. Since named properties are not “real” own properties, they will not be returned by this internal method.

The use of “real” in scare quotes is based on the wording in #es-legacy-platform-objects, but I’m open to suggestions for a more precise wording if needed.


Preview | Diff

@delan
Copy link
Contributor Author

delan commented Mar 29, 2023

Thanks @domenic, could you please commit on my behalf? I don’t think I have the right permissions.

domenic pushed a commit to whatwg/html that referenced this pull request Mar 29, 2023
@domenic domenic merged commit a35410d into whatwg:main Mar 29, 2023
@delan delan deleted the named-properties-object branch March 29, 2023 07:19
@petervanderbeken
Copy link

I did ask in web-platform-tests/wpt#36746 (comment) why we want this behaviour, but I never got an answer.

@annevk
Copy link
Member

annevk commented Mar 29, 2023

I suspect nobody really knows? But also that adding it might have some risk associated with it?

@petervanderbeken
Copy link

Note that it's the behaviour that Gecko has had all along (because we think/thought that returning something from [[GetOwnProperty]] actually means having an own property).

@annevk
Copy link
Member

annevk commented Mar 29, 2023

I don't have a strong opinion on this. If you want others to consider the Gecko behavior file a new issue? Main potentially problematic things I can think of:

  • Compat
  • Security (though I suspect the existing WindowProxy filters take care of this already)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants