In Google Chrome, there's a nice development feature to use the JavaScript console in the context of a content script that's been injected into the page, and also open a console that controls the "background page".
I've been able to use the Browser Console to tinker with my main.js Sandbox
thanks to this Stack Overflow answer, but the only way so far I've been able to figure out to access an injected content script for console tinkering is to expose its functions and variables to the page as a with unsafeWindow
. (something I'd take out in a release version)
Since Mozilla has said a few months ago that they'd be removing the ability to use unsafeWindow
like this , I'm wondering if there an alternate way of accessing a script's Sandbox
.