DEV Community

Cover image for Web Console Helpers make dev life bit easier 🐥
Rajesh Royal
Rajesh Royal

Posted on

Web Console Helpers make dev life bit easier 🐥

The JavaScript command line provided by the Web Console offers a few built-in helper functions that make certain tasks easier.

Short Example

 
In the Dev Tools

we can use $ instead of document.querySelector
and $$ instead of document.querySelectorAll.

// old
document.querySelectorAll(".myClass");

// new
$$(".myClass");
Enter fullscreen mode Exit fullscreen mode

This screenshot is taken with :screenshot in Firefox [chrome is not supported as I tried already]

Screen Shot 2022-02-08 at 17.41.02.png

Screen Shot 2022-02-08 at 17.41.02.png

A complete reference Web Console Helpers - Firefox Developer Tools | MDN

⚠ Please check the supported browsers on MDN.

Top comments (0)