I have an image which on loading i had to call a JSNI function. I had googled that IE doesn’t fires or fires before image is loaded for GWT.
I want to have a quick and simple fix to solve this problem.
My code is as follows,
Image newWindowImg = new Image("images/new_window.png") {
public void onBrowserEvent(Event event) {
if (event.getTypeInt() == Event.ONLOAD) {
addCustomToolTip();
} else if (event.getTypeInt() == Event.ONMOUSEOVER
|| event.getTypeInt() == Event.ONMOUSEMOVE
|| event.getTypeInt() == Event.ONFOCUS) {
Window.alert("Hi");
addCustomToolTip();
}
super.onBrowserEvent(event);
}
};
Any idea how to make it work for IE.
Thanks in advance.
GWT doesn’t support onLoad event for Images in IE.
There is a bug tracker for it http://code.google.com/p/google-web-toolkit/issues/detail?id=863
According to bug tracker the fix was available in 1.6