简体   繁体   中英

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

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

Calling webpage JavaScript methods from browser extension

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM