- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 28 Jun 2013 15:51:47 -0700
- To: Zirak A <zirak@mail.com>
- Cc: WHATWG <whatwg@lists.whatwg.org>
On Fri, Jun 28, 2013 at 2:28 PM, Zirak A <zirak@mail.com> wrote: > Because they may result in the same thing, but they have different semantic > meanings. I want to get an element by its id, not run a CSS selector. I want > to get elements by their tag names, not run a CSS selector. There's no semantic difference between the methods. querySelector is simply a more powerful querying function than the old DOM methods, capable of doing everything the old methods did and much more. > Besides my personal aversion towards selectors being in the DOM API, there's > also the simple fact that it makes sense for document fragments to have these > methods. That's far from obvious, given that I don't think it makes sense to spread those obsolete methods around any further. ~TJ
Received on Friday, 28 June 2013 22:52:31 UTC