W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: [DOM4] Remove Node.isSameNode

From: Alex Russell <slightlyoff@google.com>
Date: Fri, 16 Sep 2011 13:08:26 -0700
Message-ID: <CANr5HFXQN5mQDine2GD_uXnJfPAuBnatdwG0OrJKjBKRhWhsBw@mail.gmail.com>
To: Sean Hogan <shogun70@westnet.com.au>
Cc: Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>
On Fri, Sep 9, 2011 at 6:38 PM, Sean Hogan <shogun70@westnet.com.au> wrote:
> On 10/09/11 11:00 AM, Jonas Sicking wrote:
>> On Fri, Sep 9, 2011 at 2:27 PM, Sean Hogan<shogun70@westnet.com.au>
>>  wrote:
>>> On 10/09/11 3:21 AM, Jonas Sicking wrote:
>>>> It's a completely useless function. It just implements the equality
>>>> operator. I believe most languages have a equality operator already.
>>>> Except Brainfuck [1]. But the DOM isn't implementable in Brainfuck
>>>> anyway as it doesn't have objects, so I'm ok with that.
>>>> [1] http://en.wikipedia.org/wiki/Brainfuck
>>> If a DOM implementation returns  node-wrappers instead of exposing the
>>> actual nodes then you could end up with different node-refs for the same
>>> node. I'm not sure whether that violates other requirements of the spec.
>> I would expect that to violate the DOM spec. I.e. I would say that if
>> an implementation returned true for
>> someNode.firstChild != someNode.firstChild
>> then I would say that that that shouldn't be allowed by the DOM.
>> / Jonas
> The other scenario I can think of is casting. What if I want an object that
> only implements the Element interface of an element, even if it is a
> HTMLInputElement? The two objects will not be equal, but will represent the
> same node. I imagine that was the motivation for initially including the
> method.

JS doesn't have casting. At a minimum it should be removed from JS bindings.

> Having said that, if no-one is using it then it is completely useless.
Received on Friday, 16 September 2011 20:09:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:23 UTC