开发者

How to get a callback from an external html page to the running GWT page?

开发者 https://www.devze.com 2023-03-27 00:02 出处:网络
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 log

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

精彩评论

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