Re: Optionally include root element with getElementsByTagName and querySelectorAll

Anne van Kesteren <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <CADnb78iTmUs5hc0OAYYsqAg-jPY46KTOxm_opsNu8NjKkKOC2g@mail.gmail.com>
On Mon, Aug 26, 2013 at 1:08 AM, Peter Sloetjes <[email protected]> wrote:
> Example of a use case:
> A generalized cloneNode function that clones a document subtree and then
> clones the content of any contained canvas elements, including that of the
> root in case it is a canvas element.

You can just run .matches() on the element you run the queries on
(whenever we define and implement that fully). I don't think we should
add special semantics just for this scenario.


-- 
http://annevankesteren.nl/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.