chrome devtools code example

Example 1: devtools extension

A browser (user agent) extension can interact with devtools using these interfaces
devtools.inspectedWindow // Interact with the window that Developer tools are attached to (inspected window). This includes obtaining the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page.
devtools.network //Obtain information about network requests associated with the window that the Developer Tools are attached to (the inspected window).
devtools.panels // Create User Interface panels that will be displayed inside User Agent Developer Tools.

Example 2: how to open console in google chrome

SHFT+CTRL+J

Example 3: chrome extensions for devtools

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --auto-open-devtools-for-tabs

Example 4: how to open console on mobile chrome

chrome://inspect

Tags:

Go Example