Intercepting Javascript Before It's Run
In a firefox开发者_如何学Python extension, how can I intercept nodes (specifically, script tags) from being run after they're added? I assume this is possible because extensions like NoScript and AdBlockPlus appear to do it. Is it possible from the javascript interface exposed to plugins?
Don't know about NoScript, but Adblock's main weapon is nsIContentPolicy.
You might also be interested in onbeforescriptexecute. (And until the docs are updated with more info, see the bug that added this feature.)
精彩评论