简体   繁体   中英

how to insert images in web page from a firefox addon?

I have a firefox add-on I am writing, which injects javascript code into page when the page title changes.

I am adding some javascript content that builds html. I want to be able to view images inside the html and I want the images to be saved in the /content directory of my add-on. Is it possible?

Basically I think it's should be something like this:

  <img src="chrome://my_addon_id/content/images/download.jpg" />

However, it's not working.

A few tips of how to do that will be very helpful. Thanks.

也许你需要让你的插件内容可访问

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