Can I DevTools?

Share this post

Tips & Tricks #13

canidevtools.substack.com

Tips & Tricks #13

Can I run snippet of code in devtools?

Pankaj Parashar
Aug 15, 2022
Share this post

Tips & Tricks #13

canidevtools.substack.com

Chrome, Edge, Opera

  1. Sources > In the left sidebar, open Snippets > Click "+ New snippet". This will open an empty file in the main view.

  2. Enter the snippet and press Cmd+Enter to run the code.

canidev.tools/run-snippets/chrome

Firefox

  1. Open Console (Cmd+Opt+K or Ctrl+Shift+K) > Switch to multi-editor mode (Cmd+B or Ctrl+B).

  2. This will open the editor next to the Console, where you can enter the snippet and click "Run" to execute.

canidev.tools/run-snippets/firefox

Safari

  1. In Sources > Click the "+" button to Create Resource > "Console Snippet...". Input the name of the snippet and enter the script.

  2. Click the Play button next to the snippet name to execute the code in Console.

canidev.tools/run-snippets/safari

Share this post

Tips & Tricks #13

canidevtools.substack.com
Previous
Next
Comments
TopNew

No posts

Ready for more?

© 2023 Pankaj Parashar
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing