Re: use element and invalid refence

FYI,

Erik Dahlström files a bug on this:
https://code.google.com/p/chromium/issues/detail?id=477601

I agree that the specification could be more explicit what should happen.

Best,
   Kristian

Am 16.04.2015 um 16:19 schrieb Amelia Bellamy-Royds:
> The specification section on `<use>` does require a re-write, but I 
> think this is a pretty clear bug.  The link to referenced content is 
> supposed to be "live", reflecting all changes in the referenced 
> element.  That should include removing it completely!
>
> In contrast, in Chrome currently, removing the original element seems 
> to sever all links to the copy.  Other changes (before removing) are 
> correctly propagated.
>
> Try the following script in 
> http://www.w3.org/TR/SVG11/images/struct/Use01.svg
>
>     var r = document.querySelector("defs rect");
>     r.setAttribute("fill", "blue");
>     r.parentNode.removeChild(r);
>        /* required for IE, which doesn't support Element.remove() */
>     r.setAttribute("fill", "red");
>     document.querySelector("defs").insertBefore(r, null);
>
>
> The final result should be a copy of a red rectangle, but in Chrome it 
> stays blue.  Probably the event listeners they are using to respond to 
> changes in the original are not picking up the DOM modification.
>
> AmeliaBR
>
>
> P.S.  I'm pretty sure the SVG linked above is the test case you were 
> playing around with.  (The one you linked to was about gradients).


-- 
_______________________________________________________________________________

Kristian Sons
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH, DFKI
Agenten und Simulierte Realität
Campus, Geb. D 3 2, Raum 0.77
66123 Saarbrücken, Germany

Phone: +49 681 85775-3833
Phone: +49 681 302-3833
Fax:   +49 681 85775–2235
kristian.sons@dfki.de
http://www.xml3d.org

Geschäftsführung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
_______________________________________________________________________________

Received on Friday, 17 April 2015 06:23:57 UTC