Michael
Michael

Reputation: 1440

Intercepting Javascript Before It's Run

In a firefox 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?

Upvotes: 4

Views: 434

Answers (1)

Nickolay
Nickolay

Reputation: 32071

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

Upvotes: 2

Related Questions