[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.

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

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

2013-09-18 Thread Niels Keurentjes
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 them yourself at runtime, that's the whole point of a prototyped language. Common libraries

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 james.m.gre...@gmail.com wrote: var q = document.querySelector; var qq = document.querySelectorAll; On Sep 18, 2013 3:14 AM, Leon Gilyadov leon.gilya...@gmail.com wrote: *The

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 james.m.gre...@gmail.com wrote: Aww, accidentally did a direct reply instead of replying to the list. :( On Sep 18, 2013 7:01 AM, James Greene james.m.gre...@gmail.com wrote: var q = document.querySelector; var qq = document.querySelectorAll;

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 them

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 as