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

On Tue, Dec 10, 2013 at 8:16 PM, Kouhei Ueno <kouhei@chromium.org> wrote:

> I am refactoring SVG DOM implementation in Blink/Chromium.
> I would like to notify about an upcoming change in SVGList*
> implementations.
>
> In the current implementation in Blink, we follow the spec stating
> that "the inserted item is the item itself and not a copy" by
> returning exactly the same item object. Thus, the javascript object
> returned from the list is ensured to === the original object inserted
> into the list.
>
> http://www.w3.org/TR/SVG2/single-page.html#types-__svg__SVGLengthList__initialize
>
> For example, "===" operator currently returns true for the following code:
> var a = svg.createSVGLength();
> var b = list.initialize(a);
> console.log(a === b) // shows "true".
>
> However, we are considering to change our behavior here. We would like
> to return different javascript objects when retrieving list items.
> Considering the previous example, the new implementation would return
> a different javascript object for "b", thus making "a !== b".
>

It's not clear from that discussion exactly what would be affected.

For example, does this mean svgElement.x !== svgElement.x? Or
svgElement.x.baseVal != svgElement.x.baseVal?

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w

Received on Thursday, 12 December 2013 01:37:10 UTC