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

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 12 Dec 2013 14:36:42 +1300
Message-ID: <CAOp6jLZdUxxpEyTOMgD-Dqsa6Fq+UdPZUUzjwGzPNTqcQrjHKA@mail.gmail.com>
To: Kouhei Ueno <kouhei@chromium.org>
Cc: www-svg <www-svg@w3.org>
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

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