W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2012

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

From: <bugzilla@jessica.w3.org>
Date: Thu, 03 May 2012 14:25:49 +0000
To: www-dom@w3.org
Message-ID: <bug-16919-4009@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16919

           Summary: Make element traversal members available on more nodes
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
        AssignedTo: annevk@opera.com
        ReportedBy: simonp@opera.com
         QAContact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org


If you have foo and want the next element sibling, it makes sense to just use
nextElementSibling even if foo is not an element. Currently nextElementSibling
is only defined on Element. The same argument goes for the other element
traversal members.

Specifically, I think the following makes sense:

children
firstElementChild
lastElementChild
childElementCount
on Document, DocumentFragment, Element

previousElementSibling
nextElementSibling
on DocumentType, Element, CharacterData

I think this is similar to the new mutation methods (prepend() et al).

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 3 May 2012 14:25:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:09 GMT