Re: Relaxing SVGList* item object equality in Blink/Chromium

On Dec 13, 2013, at 8:34 PM, David Dailey <ddailey@zoominternet.net> wrote:

> On Friday, December 13, 2013 1:32 PM
> Tab Atkins Jr. wrote (in response to Kouhei Ueno):
> 
>>> What do you think about list item getters? They are methods, not attributes.
>>> Would your opinion be different for "list.getItem(0) !== list.getItem(0)"?
> 
>> They should return the same.  The fact that the SVG interfaces use a method rather than indexes to access elements is a silly legacy detail.  It should be treated identically to list[0], which should return the same object each time as well.
> 
> I recently did some experiments with SVG inline in HTML5 and found that list[0] seemed to work in all browsers (instead of having to use list.items(0)).

I somehow doubt that. The behavior of the SVG DOM in WebKit shouldn’t changed depending on the root document. Do you have an example?

Beside that, yes SVG2 will allow list[i].

Greetings,
Dirk

> I was pleasantly surprised. Can one expect that such would nowadays also work across browsers in a pure SVG document, or is this just an artifact of being nestled amidst the HTML5 DOM?
> 
> Cheers
> David
> 
> 
> 

Received on Friday, 13 December 2013 19:47:59 UTC