Web Inspector ReferenceConsole Snippets
Console Snippets are uniquely identified by name, which must be provided when creating them.
Creating Console Snippets
Console Snippets can be created by:
- selecting Console Snippet… when creating a resource
- selecting Create Console Snippet… in the context menu shown when clicking on the [Run Console Snippet…] in the Console Tab and Split Console
Once at least one Console Snippet has been created, a new Console Snippets section will appear in the Navigation Sidebar of the Sources Tab. This section also has a [Create Console Snippet].
All capabilities of the Console Command Line API are available inside Console Snippets.
Any modifications to the Console Snippet are automatically saved and will be used the next time the Console Snippet is run.
Running Console Snippets
Running a Console Snippet is as easy as:
- clicking on the [Run] that appears on hover in the Sources Tab
enterwhen selected in the Navigation Sidebar of the Sources Tab
- selecting it in the context menu shown when clicking on the [Run Console Snippet…] in the Console Tab and Split Console