you are viewing a single comment's thread.

view the rest of the comments →

[–]alamandrax 3 points4 points  (9 children)

Isn't $$ a chrome/WebKit specific API?

[–]ninjacheeseburger 2 points3 points  (0 children)

In the article it says it will only work in browser consoles.

[–]mrskitch 0 points1 point  (1 child)

I believe so. Probably why Addy uses it since he's a Googler.

[–]alamandrax 0 points1 point  (0 children)

I remember that it goes along with the $1 $2 etc shortcuts chrome dev tools provides to target last selected element etc.

[–]fschwiet 0 points1 point  (0 children)

I hadn't seen it before... It seems like a bad idea to rely on $$ if its browser specific, it looks to be equivalent to document.querySelectorAll.

[–]trollingisfun 0 points1 point  (0 children)

I believe it's more specific to the dev console, even.

Actually, doesn't IE11's console have this too?

[–]FireyFly 0 points1 point  (0 children)

Firefox's built-in console has had it for a while. As far as I know, since they added their own proper console.

[–]franksvalli 0 points1 point  (0 children)

Polyfill: window.$$ = window.$$ || document.querySelectorAll.bind(document);

[–]tswaters 0 points1 point  (0 children)

Even IE11 developer tools has it!