On 6/18/14, 8:59 AM, Robert O'Callahan wrote:
For example, SVGIframeElement as specced has two
"width" attributes.

Which actually means the IDL will fail to be parsed with a conforming Web IDL parser.

"SVGIframeElement implements HTMLIFrameElement" creates a multiple
inheritance situation that I don't think any engine would really want to
implement, even if it made sense, which I don't think it does.

For what it's worth, all that line means is "copy all the methods/properties from HTMLIframeElement.prototype and its ancestors to SVGIframeElement.prototype". No multiple inheritance involved per se.

Of course in this case both HTMLIframeElement and SVGIframeElement ultimately inherit from Element and Node, but as WebIDL is currently written I believe all that "implements" statement will do is also copy all the Node and Element stuff onto SVGIframeElement.prototype. This will, of course, greatly confuse authors who try to hook things on Element.prototype and discover it works for every element except SVGIframeElement...

In any case, whether the implementations of those methods/properties make sense after the copying is done depends on exactly how they're written. I strongly doubt the HTMLIframeElement ones are all written in a generic enough way, so this would definitely need coordination with the HTML editor.

Fully agreed on the rest of your mail about this not being the way to go, if that wasn't clear. ;) And I strongly recommend running any draft IDL through an actual conforming IDL parser and not publishing any drafts with invalid IDL.

-Boris

Reply via email to