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

Introduce an UnenumerableOperations extended attribute #719

Closed
wants to merge 3 commits into from

Conversation

Ms2ger
Copy link
Member

@Ms2ger Ms2ger commented Apr 26, 2019

@domenic
Copy link
Member

domenic commented Apr 26, 2019

Thanks for working on this! I have two thoughts:

  • Should we provide some sort of guidance on when to use or not use this? It seems quite experimental. The nightmare scenario for me is various spec authors sprinkling this in their specs because they think enumerability is weird, or non-enumerability is more JavaScript like. ("Various spec authors", like myself 5 years ago.)

  • Alternately, we could make this part of the "new defaults" inside modules, and not have a separate extended attribute at all.

index.bs Show resolved Hide resolved
@annevk
Copy link
Member

annevk commented May 24, 2019

I agree with @domenic.

If we want this for modules, but are unsure outside of modules, let's limit it to modules.

If we are sure outside of modules, let's make it the default and sprinkle LegacyEnumerableOperations around.

@Ms2ger
Copy link
Member Author

Ms2ger commented Jun 17, 2019

I am not sure this is desirable anywhere, but I updated the PR to make this the behaviour for modules.

Comment on lines +11235 to +11237
1. Let |enumerable| be <emu-val>false</emu-val> if |definition| is an [=interface=] that has
the [{{UnenumerableOperations}}] [=extended attribute=] and <emu-val>true</emu-val>
otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

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

This should also be defined for Stringifiers, Common iterator behavior § forEach and Iterable declarations, like I’m doing in #825.

@littledan
Copy link
Collaborator

This PR was motivated by using WebIDL in a way that bridges the gap a bit with JS classes (which might relate to some built-in modules proposals, to facilitate accurate polyfilling) and TC39 conventions. It seems like we're not currently moving in that direction very much at the moment, so leaving this PR hanging (or closing it?) seems like right call.

@annevk annevk added the do not merge yet Pull request must not be merged per rationale in comment label Apr 30, 2020
@domenic
Copy link
Member

domenic commented Apr 30, 2020

Let's close this until we have a concrete consumer.

@domenic domenic closed this Apr 30, 2020
@annevk annevk deleted the UnenumerableOperations branch October 5, 2021 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge yet Pull request must not be merged per rationale in comment
Development

Successfully merging this pull request may close these issues.

5 participants