On Fri, Jan 15, 2010 at 2:38 PM, Erez <ere...@gmail.com> wrote:
> If a content script that dynamically creates an HTML element in the
> page.
> The element contains images. To load images from the extension seems a
> lot of work and must be done in code, if am not mistaken.

Hey Erez, I don't think injecting local images is a whole lot of work (in HTML):

  <img src="chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef/foo.png" />

where "abcdefghijklmnopqrstuvwxyzabcdef" is the extension ID and
"foo.png" is the image path relative to the extension directory.

Or (in JavaScript):

  chrome.extension.getURL('foo.png');

where "foo.png" is, once again, the image path relative to the
extension directory.

But ...

> Is it ok to load images from a remote server? It means that those
> images won't be available when not connected to the network.

Sure.
-- 
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@googlegroups.com.
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to