W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2013

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

From: James Greene <james.m.greene@gmail.com>
Date: Wed, 18 Sep 2013 09:18:05 -0500
Message-ID: <CALrbKZjPbMbdftEh0j2r1snPx5B5_JKR_zPADK-z=UWV+ooiCw@mail.gmail.com>
To: WHATWG <whatwg@lists.whatwg.org>
Aww, accidentally did a direct reply instead of replying to the list. :(
On Sep 18, 2013 7:01 AM, "James Greene" <james.m.greene@gmail.com> wrote:

> var q = document.querySelector;
> var qq = document.querySelectorAll;
> On Sep 18, 2013 3:14 AM, "Leon Gilyadov" <leon.gilyadov@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.
>>
>
Received on Wednesday, 18 September 2013 14:18:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:09 UTC