12.12 Working with the Command Line
Browser tools such as Chrome DevTools, Firebug, or Safari's developer tools are standard tools for any web developer—whether to inspect a web page's DOM tree, generate output on the console, evaluate expressions and function calls, define breakpoints for debugging, go through the individual steps of a web application's JavaScript code, profile the application, or monitor network traffic.
But only some developers know that these tools also provide various functionalities via JavaScript (see Table 12.15). This is a good opportunity to give a brief overview of the relatively unknown Command Line API, which is supported by Chrome (https://developer.chrome.com/devtools/docs/commandline-api), Safari (https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Console/Console.html ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access