How do I execute a page-defined JavaScript function from a Firefox extension?

前端 未结 5 1887
感动是毒
感动是毒 2021-01-04 21:14

I\'m creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not insid

5条回答
  •  执念已碎
    2021-01-04 21:58

    You can do it, but you need to have control over the page and be able to raise the privilege level for the script. Mozilla Documentation gives an example - search for "Privilege" on the page.

提交回复
热议问题