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

Simon Pieters simonp at opera.com
Wed Sep 18 07:26:35 PDT 2013

On Wed, 18 Sep 2013 16:18:05 +0200, James Greene  
<james.m.greene at 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 at 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

More information about the whatwg mailing list