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

[Exposed] doesn't seem to work well with partial interfaces #154

Closed
domenic opened this issue Aug 25, 2016 · 2 comments
Closed

[Exposed] doesn't seem to work well with partial interfaces #154

domenic opened this issue Aug 25, 2016 · 2 comments
Labels
☕☕ difficulty:medium Hard to fix ⌛⌛ duration:medium Shouldn't be too long to fix

Comments

@domenic
Copy link
Member

domenic commented Aug 25, 2016

Previously at #121 (comment) and #121 (comment)

The spec currently says

"Any extended attribute specified on a partial interface definition is considered to appear on the interface itself"

Which does not seem to work well with [Exposed] (and possibly not well with [SecureContext] either). Probably that statement needs to be modified, but we also need to think about why it's there in the first place and for what extended attributes it does make sense

We are also missing a potential restriction which seems important, namely "If [Exposed] appears on a partial interface, then the partial interface's exposure set MUST be a subset of the interface's exposure set."

In general it's not clear what putting different [Exposed] values on an interface vs. a partial interface might mean, or on members of an interface or members of a partial interface.

@bzbarsky
Copy link
Collaborator

Now that you mention the "why it's there" bit, I think that statement was added so you could add a [Constructor] via a partial interface and have it work in the "sane" way: by adding a constructor or constructor overload to the main interface.

@domenic
Copy link
Member Author

domenic commented Oct 17, 2017

@tobie this may be fixed with your recent overhaul; can you check?

foolip added a commit to lukebjerring/wpt that referenced this issue Jun 8, 2018
domenic pushed a commit that referenced this issue Jan 28, 2019
It seems like a bad idea to allow [Global] on a partial interface.

The behavior of [Exposed] and [SecureContext] on partial interfaces is already
defined in the relevant algorithms.

The behavior of [OverrideBuiltins] is defined here with the same vague wording
used before. It might be better to disentangle the concept of an interface and
its syntactical structure.

Fixes #154.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☕☕ difficulty:medium Hard to fix ⌛⌛ duration:medium Shouldn't be too long to fix
Development

No branches or pull requests

3 participants