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

James Greene james.m.greene at gmail.com
Wed Sep 18 07:18:05 PDT 2013


Aww, accidentally did a direct reply instead of replying to the list. :(
On Sep 18, 2013 7:01 AM, "James Greene" <james.m.greene at gmail.com> wrote:

> var q = document.querySelector;
> var qq = document.querySelectorAll;
> On Sep 18, 2013 3:14 AM, "Leon Gilyadov" <leon.gilyadov at gmail.com> wrote:
>
>> *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.
>>
>



More information about the whatwg mailing list