I want execute some logic after the moment when widget is attached and all images inside this widget are loaded. This widget show a block of html prepared in CMS (so the number of images is dynamic).
What have I tried:
- override
Widget.onAttach()
orWidget.onLoad()
. Unfortunately both of them are executed before the moment when all images are loaded. - I found gwt-image-loader library which can add a callback per image. I wan't use it due to dynamic nature of the content.
In JavaScript there is this option which works great:
$('selector').waitForImages(function() {
// do some logic
});
Maybe I missed some GWT way to do the same thing?