W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2013

Re: [whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 09 Oct 2013 20:02:19 -0400
Message-ID: <5255EE8B.2000007@mit.edu>
To: whatwg@lists.whatwg.org
On 6/28/13 10:01 PM, Boris Zbarsky wrote:
> On 6/28/13 5:06 PM, Tab Atkins Jr. wrote:
>> getElementById("foo") is just querySelector("#foo")
>
> This is actually false.  For example, getElementById("foo:bar") is just
> querySelector("#foo\\:bar"), which is ... nonobvious.

And today someone asked me how to do the equivalent of 
getElementById("\n") with querySelector.  That one is even more non-obvious.

-Boris
Received on Thursday, 10 October 2013 00:02:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:11 UTC