W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2013

Re: Optionally include root element with getElementsByTagName and querySelectorAll

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 26 Aug 2013 10:29:05 +0100
Message-ID: <CADnb78iTmUs5hc0OAYYsqAg-jPY46KTOxm_opsNu8NjKkKOC2g@mail.gmail.com>
To: Peter Sloetjes <pjs.nl@live.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
On Mon, Aug 26, 2013 at 1:08 AM, Peter Sloetjes <pjs.nl@live.com> 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/
Received on Monday, 26 August 2013 09:29:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:03 UTC