Option to execute console input on page load
Categories
(DevTools :: Console, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: Harald, Unassigned)
References
(Blocks 1 open bug)
Details
Scratchpad allowed this for changing the behavior of build-in DOM/JS methods and iterating on greasemonkey/extension-like scripts.
Inspector's bootstrapped scripts are another mechanism for this: https://webkit.org/web-inspector/inspector-bootstrap-script/
… guaranteed to be the first script evaluated after any new JavaScript global object is created in any page, including <iframe>, regardless of URL, so long as Web Inspector is open.
We have a few options for the workflow, but for an MVP these 2 simple options (and maybe others) stand out:
Option a) Checkbox "Run on load"
Allows navigating a site while the Console is open and all loaded contexts will be injected with the snippet.
Option b) New button "Reload And Run"
What Scratchpad offered as menu option. Shortcut for reloading the page and injecting the snippet once. Lacks the injection into follow-up navigation and iframes.
Description
•