Detecting with jQuery that a GWT application has loaded
I'm incorporating a GWT application in my website and I need to execute some functions after the application has finished loading.
I've read this question but calling some javascript function from GWT is not what I want. I would like to be able, from the page开发者_运维百科, to detect that the loading is finished.
Is there a way to fire an event from GWT that I could listen to from jquery ?
Ideally without the need to create a jQuery custom event inside GWT.
You could probably just use this
NativeEvent event = Document.get().createChangeEvent();
DomEvent.fireNativeEvent(event, this);
To fire a custom event (after populating it) and having it event propagate to some jQuery handler. It seems like an awful amount of overhead to bundle in jQuery when using the build in stuff from GWT would most likely suffice (i.e. onLoad();
)
Additionally, you might look into GWTQuery.
精彩评论