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

ExtendableMessageEvent.source cannot be SameObject #816

Closed
ehsan opened this issue Jan 9, 2016 · 5 comments
Closed

ExtendableMessageEvent.source cannot be SameObject #816

ehsan opened this issue Jan 9, 2016 · 5 comments
Labels
Milestone

Comments

@ehsan
Copy link

ehsan commented Jan 9, 2016

According to WebIDL, [SameObject] doesn't apply to union types, so we should remove this annotation from ExtendableMessageEvent.source.

@jungkees jungkees added this to the Version 1 milestone Jan 11, 2016
@jungkees
Copy link
Collaborator

The [SameObject] extended attribute must not be used on anything other than a read only attribute whose type is an interface type or object. (WebIDL 4.3.15 [SameObject])

Did you reference this part? Before removing it, I just want to make sure whether it intends to disallow the case when all the member types of the union are interface types.

/cc @heycam @bzbarsky

@bzbarsky
Copy link

That part of the IDL spec is just bogus, imo; there are existing IDL issues on that. Any type that's always an object, including unions of interface types, Promise, etc, should be OK to use with [SameObject].

Arguably, even a union for which some types are an object should be OK with [SameObject].

@heycam may have pointers to the IDL spec issues off the top of his head.

@jungkees
Copy link
Collaborator

Sounds reasonable. I found the IDL spec issue for this: whatwg/webidl#71

@jakearchibald
Copy link
Contributor

Pre F2F notes: Doesn't look like there's anything to discuss

@jungkees
Copy link
Collaborator

Closing waiting on the IDL issue.

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

No branches or pull requests

4 participants