- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Fri, 28 Jun 2013 22:01:22 -0400
- To: whatwg@lists.whatwg.org
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. It gets worse if you don't control the id that's passed in, because getElementById(arg) becomes querySelector("#"+cssEscape(arg)) where cssEscape is a not entirely trivial-to-write function, if you want it to work reliably. -Boris
Received on Saturday, 29 June 2013 02:01:50 UTC