W3C home > Mailing lists > Public > www-svg@w3.org > March 2013

Re: SVGSVGElement.toDataURL()

From: Robin Berjon <robin@w3.org>
Date: Mon, 11 Mar 2013 15:53:57 +0100
Message-ID: <513DF005.1070701@w3.org>
To: Jeremie Patonnier <jeremie.patonnier@gmail.com>
CC: Dirk Schulze <dschulze@adobe.com>, Robert Longson <longsonr@gmail.com>, www-svg <www-svg@w3.org>
On 11/03/2013 15:23 , Jeremie Patonnier wrote:
> 2013/3/11 Robin Berjon <robin@w3.org <mailto:robin@w3.org>>
>     On 11/03/2013 15:03 , Dirk Schulze wrote:
>         'innerhHTML' is defined in 'HTMLElement.idl' at the moment. This
>         definition would need to move to 'Element.idl'. The HTML WG and
>         WEBAPS WG need to agree on that.
>     Or conversely, SVGElement could inherit from HTMLElement.
> Mmmh... I'm not sure about this for two reason :
>   * Whatever people said, SVG is not HTML, and SVG can be used
>     standalone, wich mean having a requirement to implement part of HTML
>     to support SVG is not necessarily a good idea for some people (I
>     think about people writing Vector Drawing Software that could allow
>     to use and manipulate the output DOM for example)

It's just an interface. Just because it has "HTML" in the name doesn't 
mean that it involves implementing part of HTML. A rose by any other 
name and all that.

>   * Having innerHTML inside "Element.idl" allow to imagine using it on
>     any XML content (MathML for instance) which will empowered users in
>     many ways.

Two things:

    Other languages can inherit from HTMLElement too.
    Consistency empowers users.

If you move innerHTML to Element, what happens to all the other useful 
things such as outerHTML, insertAdjacentHTML, dataset, hidden, style... 
? HTMLElement is the basic unit that I'd expect all elements in a 
browser context to support.

Conversely, placing it on Element means that it becomes available in 
contexts in which people don't normally see it, such as regular server 
DOM stuff. That strikes me as weird, and possibly problematic.

I'm not saying that SVG is HTML, but at the very least in a browser 
context, even when standalone, it really should script in the same way. 
Libraries should Just Work. Developers shouldn't be surprised. Ideally 
SVG should inherit as much as possible, and only focus on defining the 
things that make it special.

Robin Berjon - http://berjon.com/ - @robinberjon
Received on Monday, 11 March 2013 14:54:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:41 UTC