Search code examples
javascriptfirefox-addonfirefox-addon-sdk

call page function from firefox addon with location.href doesn't work


i try to call a javascript function from the original page from my firefox extension content_script like this:

content_scripts.js

location.href="javascript:tellParent('lightboxClose();'); void 0";

This works very well in my Chrome Extension but doesn't work in my Firefox Addon.

Is there a similar solution or a workaround to call that function from the page? I'm searching for a solution since hours and can't get it to work.

Hope you can help me


Solution

  • Finaly after hours of searching i found a solution that works for me.

    Calling webpage JavaScript methods from browser extension