DEV Community

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

Posted on

3 2

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs