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

WedIDL: partial interface definition cannot specify inheritance #250

Closed
mwatson2 opened this issue Jun 10, 2016 · 6 comments
Closed

WedIDL: partial interface definition cannot specify inheritance #250

mwatson2 opened this issue Jun 10, 2016 · 6 comments
Assignees
Milestone

Comments

@mwatson2
Copy link
Contributor

We have:

partial interface HTMLMediaElement : EventTarget { ... };

however according to https://heycam.github.io/webidl/#dfn-partial-interface a partial interface definition cannot specify inheritance. HTMLMediaElement inherits Element which inherits Node which inherits EventTarget, so we do not need to specify this.

@mwatson2 mwatson2 added this to the V1Editorial milestone Jun 10, 2016
@jdsmith3000 jdsmith3000 self-assigned this Jun 21, 2016
@jdsmith3000
Copy link
Contributor

@mwatson2: I believe the current spec here may be correct. It defines HTMLMediaElement as a partial interface so that we can make interface additions in a separate document. I don't believe an interface can do this. The limitation on inheritance may apply only to inheritance rules we define ourselves, and we don't have any of these.

@mwatson2
Copy link
Contributor Author

@jdsmith3000 What I meant is that we do not need to include the : EventTarget. WebIDL doesn't allow us to specify this on a partial interface and the original definition of HTMLMediaElement already has EventTarget in the inheritance chain.

@jdsmith3000
Copy link
Contributor

@mwatson2: Makes sense. I'll remove the EventTarget.

jdsmith3000 added a commit to jdsmith3000/encrypted-media that referenced this issue Jul 19, 2016
@ddorwin
Copy link
Contributor

ddorwin commented Aug 2, 2016

@jdsmith3000's commit above needs to be converted to a PR against mainline. It looks like this is an easy fix and merge.

@jdsmith3000
Copy link
Contributor

I was preparing to do this, but found that the latest editors draft already fixes this problem. It is possible it was corrected as part of Issue #170 "Switch to Contiguous IDL". It is at least present in that version of the spec.

I'm closing this issue as fixed.

@mwatson2
Copy link
Contributor Author

mwatson2 commented Aug 3, 2016

Apologies - I forgot I needed to fix this to get the IDL to compile in Contiguous IDL mode.

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

No branches or pull requests

3 participants