Re: [whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll

2013-09-18 Thread Tobie Langel
On Wednesday, September 18, 2013 at 5:27 PM, Glenn Maynard wrote: > On Wed, Sep 18, 2013 at 7:18 AM, Niels Keurentjes < > niels.keurent...@omines.com (mailto:niels.keurent...@omines.com)> wrote: > > The spec should only concern itself with exposing functionality. Practical > > considerations such a

Re: [whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll

2013-09-18 Thread Glenn Maynard
On Wed, Sep 18, 2013 at 7:18 AM, Niels Keurentjes < niels.keurent...@omines.com> wrote: > The spec should only concern itself with exposing functionality. Practical > considerations such as length of code are the responsibility of the > developer - if you like to have q and qq aliases you can add

Re: [whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll

2013-09-18 Thread Simon Pieters
On Wed, 18 Sep 2013 16:18:05 +0200, James Greene wrote: Aww, accidentally did a direct reply instead of replying to the list. :( On Sep 18, 2013 7:01 AM, "James Greene" wrote: var q = document.querySelector; var qq = document.querySelectorAll; That doesn't work because `this` will be wro

Re: [whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll

2013-09-18 Thread James Greene
Aww, accidentally did a direct reply instead of replying to the list. :( On Sep 18, 2013 7:01 AM, "James Greene" wrote: > var q = document.querySelector; > var qq = document.querySelectorAll; > On Sep 18, 2013 3:14 AM, "Leon Gilyadov" wrote: > >> *The problem:* >> document.querySelector and docu

Re: [whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll

2013-09-18 Thread Niels Keurentjes
] On Behalf Of Scott González Sent: woensdag 18 september 2013 14:11 To: Leon Gilyadov Cc: whatwg@lists.whatwg.org Subject: Re: [whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll So you're suggesting new globals that are bound to the document? That sounds really

Re: [whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll

2013-09-18 Thread Scott González
So you're suggesting new globals that are bound to the document? That sounds really bad. Also, there's no reason to suggest an alias to querySelector() when it's much more likely that query() will be used by the majority of developers. On Wed, Sep 18, 2013 at 4:14 AM, Leon Gilyadov wrote: > *The

[whatwg] Proposal: q and qq for document.querySelector and document.querySelectorAll

2013-09-18 Thread Leon Gilyadov
*The problem:* document.querySelector and document.querySelectorAll are long and used a lot. Lines in the code are long. *Proposal:* q('.my-div') will be equal to: document.querySelector('.my-div) qq('.my-div') will be equal to: document.querySelectorAll('.my-div') --Leon Gilyadov.