How to get a callback from an external html page to the running GWT page?
I work on a simple logger-page enhancement. It being opened from main GWT module in a separate window by the invoking JSNI $wnd.open method. What I want to get is that when I click a button (on the logger page) my main GWT's page gets notified. Is it possible to achieve? Any help will be much appre开发者_Python百科ciated.
You are looking for window.opener https://developer.mozilla.org/en/DOM/window.opener
So have to define a function in your gwt app in JSIN native method:
$win.openerCallback = function(){};
and in your logger page:
window.opener.openerCallback()
to call the function in your gwt app
精彩评论