Firstly as for the desktop (not Android) application.
I want to replace the source of an image which is placed inside loaded HTML document to local one (from my hard drive). I show loaded page using JavaFX components: webEngine->webView->Scene->Stage. What I did?
I loaded a page using webEngine.load("http://any_page"). After that I obtained an image object (on Java side) and casted it to HTMLImageElementImpl. This is the representation of object which exists on loaded page. I set the src attribute like below:
htmlImageElementImpl.setSrc("file:/local_path_to_my_image");
...and expected the new image will appear on loaded page. Unfortunately it does not work. Previous image (which originally was on loaded page) has dissapeared and new has not appear (there is a white area). I determined that this image is there (when I click right button on it, it is possible to choose an "open image in new window" option and see it). It appears. I think that it need to refresh the component to show it.
What is interesting when I replace src of this tag to image exisiting in the Internet like below:
htmlImageElementImpl.setSrc("http://_file_existing_in_the_internet//image.jpg");
...every works fine and replaced image appears on the fly.
I has spend two days and I have not managed with this problem. So I decided to ask you.
Best regards
Kess