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

Revive @@iterator for PluginArray/MimeTypeArray #6368

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Feb 9, 2021

@@iterator is implicitly defined by indexed property getters. Since there is no other way to define it exclusively, this restores some methods back to getters.

(See WHATWG Working Mode: Changes for more details.)


/obsolete.html ( diff )

@@iterator is [implicitly defined by indexed property getters](https://heycam.github.io/webidl/#ref-for-dfn-indexed-property-getter%E2%91%A6). Since there is no other way to define it exclusively, this restores some methods back to getters.
@annevk
Copy link
Member

annevk commented Feb 9, 2021

If Chrome is in fact removing @@iterator I'd be okay with that end state as well to be clear. Perhaps for-of is new enough for it not to matter.

cc @mfreed7

@domenic
Copy link
Member

domenic commented Feb 9, 2021

It's probably simplest to merge this to get us back to "no behavior changes for Firefox" and "minimal compat risk for Chrome". Even if we leave it in forever it's not a big deal; the gain from removing this is much less than the gain from removing Plugin and MimeType.

@@ -117129,7 +117129,7 @@ interface <dfn data-x="dom-Plugin">Plugin</dfn> {
readonly attribute undefined <span data-x="dom-Plugin-description">description</span>;
readonly attribute undefined <span data-x="dom-Plugin-filename">filename</span>;
readonly attribute undefined <span data-x="dom-Plugin-length">length</span>;
undefined <span data-x="dom-Plugin-item">item</span>(unsigned long index);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this change is especially strange since instances of Plugin cannot be instantiated. So this really only is detectable via Symbol.iterator in Plugin.prototype.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do hope we can remove Plugin and MimeType, seems likely given iOS.

@domenic domenic merged commit c5a1bdf into whatwg:main Feb 9, 2021
@saschanaz saschanaz deleted the plugin-getters branch February 9, 2021 17:29
@mfreed7
Copy link
Contributor

mfreed7 commented Feb 12, 2021

If Chrome is in fact removing @@iterator I'd be okay with that end state as well to be clear. Perhaps for-of is new enough for it not to matter.

cc @mfreed7

I think I'm ok trying to remove @@iterator eventually, but I'm still sufficiently concerned about just emptying the arrays that I'd like to let that settle for some time (several months at least). Perhaps we could revisit then?

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