开发者

Intercepting Javascript Before It's Run

开发者 https://www.devze.com 2023-01-26 02:57 出处:网络
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 AdB

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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消