W3C home > Mailing lists > Public > www-svg@w3.org > January 2014

Re: Removing the SVG instance tree (SVG2 issue 51)

From: Erik Dahlström <ed@opera.com>
Date: Wed, 08 Jan 2014 10:33:21 +0100
To: "www-svg@w3.org" <www-svg@w3.org>, "Philip Rogers" <pdr@google.com>
Cc: "Tab Atkins" <tabatkins@google.com>, "Florin Malita" <fmalita@google.com>, "Stephen Chenney" <schenney@google.com>
Message-ID: <op.w9c3hvevdhsuf5@gnorps>
On Wed, 08 Jan 2014 02:24:28 +0100, Philip Rogers <pdr@google.com> wrote:

> www-svg,
>
> Can we remove the instance tree in SVG2?
>
> Over the holidays I implemented SVG's <use> in terms of pure web
> components. This works well and <use>+web components will vastly simplify
> the SVG2 spec. Unfortunately, the instance tree is incompatible with  
> shadow
> dom and I'd like to propose removing the instance tree.
>
> For users, the instance tree has not been popular. I added a counter to
> Chrome's usage statistics in http://crbug.com/313438 and found zero users
> of instanceRoot. I searched all of github and found only 9
> non-layouttest<https://github.com/search?l=javascript&p=1&q=correspondingElement&ref=cmdform&type=Code>uses
> of correspondingElement.

Most of the uses of correspondingElement I've seen (and how I've  
personally used it) was accessing correspondingElement via an Event, e.g a  
mouse event that was dispatched to an SVGElementInstance target.

I've probably only used the instanceRoot accessor a handful of times  
myself, so I'm not surprised by those results.

...
> Can we unify on the event model used by shadow dom and drop the instance
> tree?
> http://www.w3.org/TR/components-intro/#events

I'm not opposed to basing SVG2's <use> on Web Components / Shadow DOM if  
it preserves rendering of existing content, even at the cost of possibly  
breaking some content that uses the SVGElementInstance interface. In other  
words I'm fine with removing SVGElementInstance if we replace it with full  
support for Web Components and the corresponding encapsulated DOM there.

Also I'd expect to be able to use SVGElement methods and accessors on all  
the Shadow DOM element interfaces (currently they inherit from  
HTMLElement).


-- 
Erik Dahlstrom, Web Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Received on Wednesday, 8 January 2014 09:34:23 UTC

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