W3C home > Mailing lists > Public > public-webapps-bugzilla@w3.org > November 2012

[Bug 16919] Make element traversal members available on more nodes

From: <bugzilla@jessica.w3.org>
Date: Fri, 09 Nov 2012 18:00:26 +0000
To: public-webapps-bugzilla@w3.org
Message-ID: <bug-16919-2532-exQPH7THBt@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16919

--- Comment #5 from Erik Arvidsson <arv@chromium.org> ---
(In reply to comment #4)
> But it sounds like in general you think this is a good idea?

Yes. It sounds like an improvement.

The reason why I think nextElementSibling makes sense for all Nodes is that it
would give the next sibling node that is an Element. Conceptually
nextElementSibling is just:

Object.defineProperty(Node.prototype, 'nextElementSibling', {
  get: function() {
    for (var next = this.nextSibling;
         next && next.nodeType !== Node.ELEMENT_NODE;
         next = next.nextSibling);
    return next;
  },
  ...
});

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 9 November 2012 18:00:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 9 November 2012 18:00:31 GMT