W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: [DOM4] parent method

From: Sweeney, Kevin <Kevin.Sweeney@vimeo.com>
Date: Fri, 16 Dec 2011 11:03:06 -0500
To: Ojan Vafai <ojan@chromium.org>
CC: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <34646FB5-3BD7-49CB-8920-BCE657291AE8@vimeo.com>
Are you referring to the parents() method? I was under the impression that parent(selector) only grabbed the parent node if it matched the selector, while parents() would go up the ancestor tree.

2. What should happen in the following cases? My intuition is that they should all return either null or node.parentNode, but I don't feel strongly.
-node.parent("")
-node.parent(undefined)
-node.parent(null)
-node.parent(5)

I would expect the same functionality as document.getElementById—all of your examples would return null.
Received on Sunday, 18 December 2011 12:22:31 GMT

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