Firefox XPCOM component - Permission denied to call method UnnamedClass

前端 未结 2 1299
情歌与酒
情歌与酒 2021-01-22 00:19

Can a firefox XPCOM component read and write page content across multiple pages?

Scenario: A bunch of local HTML and javascript files. A \"Main.html\" file opens a wind

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-22 00:32

    Does Main.html and that other window run with chrome privileges? If you access Main.html "normally", just putting it on the location bar of Firefox, then it will have restrictions to what it can do (Otherwise, an arbitrary web page could do exactly the same).

    If you are creating a firefox plugin, place your code in a XUL overlay.

    If you really want to allow any web page to do whatever it is your plugin does, you can establish some mechanism through wich the page can ask the plugin to do the operation with its chrome privileges and send the result to the page afterwards.

    If you are NOT making a firefox extension...then I am afraid I misunderstood something, could you explain it more?

提交回复
热议问题