Flash Thunder
Flash Thunder

Reputation: 12036

Access icon image from html in chrome extension

How do I access my extension icon image from modified external html page code? I mean, in popup, I can use . as root directory, but when modifying external page, . would be the root of that page, not my extension.

Upvotes: 0

Views: 64

Answers (1)

Xan
Xan

Reputation: 77523

chrome.runtime.getURL(path) comes to the rescue.

You will also need to declare your resources as web-accessible.

Upvotes: 1

Related Questions