Allow getting and setting resources

8 views
Skip to first unread message

Moshe Kolodny

unread,
Feb 19, 2015, 12:11:00 PM2/19/15
to rdev...@googlegroups.com
I would like to be able to get and set a javascript resource from devtools. My goal is to be able to do something like

// assume http://www.site.com/js/lib.js contains `setInterval('console.log("foo")', 1000)`
var jsCode =
__commandLineAPI.getResource('http://www.site.com/js/lib.js');
jsCode
= jsCode.replace(/foo/g, 'bar');
__commandLineAPI.getResource('http://www.site.com/js/lib.js', jsCode);
// now we start logging bar without a reload similar to
https://remysharp.com/2012/12/21/my-workflow-never-having-to-leave-devtools

If it's also possible, exposed to the regular js sandbox behind a flag.

This will let a live reload mechanism to work without starting chrome with remote debug on, and will also let the regular devtools to be used while "live editing"

Hadley Wickham

unread,
Feb 19, 2015, 12:26:50 PM2/19/15
to Moshe Kolodny, rdev...@googlegroups.com
I think you have the wrong mailing list.
Hadley
> --
> You received this message because you are subscribed to the Google Groups
> "devtools" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rdevtools+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
http://had.co.nz/
Reply all
Reply to author
Forward
0 new messages