W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2014

Re: [whatwg] SVG cloning elements from HTML5

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 18 Jun 2014 10:51:47 -0400
Message-ID: <53A1A783.3060309@mit.edu>
To: whatwg@lists.whatwg.org
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 

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.

Received on Wednesday, 18 June 2014 14:52:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:21 UTC