Lazy Plus Thoughts and Possible Feedback

For those that use Chrome Dev Tools, do you use the new Snippets feature?

If so, would it be of use to have certain scripts/snippets auto run? Saving you from manually running the script and thus making them available when ever Dev Tools is opened?

As i have been going through Webkit's inspector front end code lately and found that ( if my logic is correct ) it is possible  to "autorun" certain snippets. If this seems to be a nice added feature, i will log a feature request with Webkit, else should i have some spare time, attempt the change.

For those interested in the code or a starting point to go digging, the Snippet code can be found here - ( 1 )
The code is nicely layered out / documented so finding necessary methods is relatively simple.

And those interested in my thinking behind it, it is to adjust WebInspector.UISourceCode constructor ( 2 ) to store an "_autoRun" property along with the other scriptFile details. When the snippet, it's details ( path , contentType etc) is stored, the autoRun value is also stored. Then in the WebInspector.SnippetScriptFile method _addScriptSnippet which is called from _loadSnippets , should "_autoRun" be true, execute the run ( "_runScript" ) method. The only thing needed would be to adjust the UI and add a checkbox / settings of some sort per snippet which would update this property.


Update - A Chrome "Bug" report has been filed to add this feature -

#DevTools   #FeatureRequest   #JavaScript  
Shared publiclyView activity