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

On Wed, 18 Sep 2013 16:18:05 +0200, James Greene  
<james.m.greene@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.greene@gmail.com> wrote:
>
>> var q = document.querySelector;
>> var qq = document.querySelectorAll;

That doesn't work because `this` will be wrong. But you can add  
.bind(document) to fix that.

-- 
Simon Pieters
Opera Software

Received on Wednesday, 18 September 2013 14:27:05 UTC