开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜