[webkit-dev] change the image sources with Javascript
Nacho Abejaro
fantasy54 at gmail.com
Mon Oct 27 05:19:00 PDT 2008
Hello, I have a test application that works as a kind of demo browser, where
I change the source of all images from any HTML page using a custom
Javascript that I introduce in it through WebKit. My Javascript just does
that:
newSource = "file:///c:/test.jpg";
var images = document.getElementsByTagName("img")
for (var i=0; i<images.length; i++) {
image=images.item(i);
image.src = newSource;
}
It used to work well, but I've noticed that, after I've compiled it with the
latest Webkit snapshots, it doesn't work anymore: it does change the images
src, but the change is not reflected in the browser. However, if, instead of
an image located in the local disk, I choose an image located in a Web
server (changing the first line by: newSource = "
http://anyserver/anyfile.jpg"), it works!
So, my question is: is there now any kind of restrictions on Webkit about
directly changing the image sources with Javascript and pointing them to
local files?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081027/1ccb7cc3/attachment.html>
More information about the webkit-dev
mailing list