Reputation: 1
In Javascript, I can do the following:
var child = window.open(URL, "_blank"); child.onclose = myChildCloseHandler();
Is it possible to do that same thing with GWT? The main problem seems to be that Window.open does not return any handle to the child window.
Upvotes: 0
Views: 155
Reputation: 64561
There are two ways to do it in GWT:
elemental.html.Window
with addEventListener
)use JSNI:
public native void open(String url) /*-{
var child = window.open(url, "_blank");
var that = this;
child.onclose = $entry(function() {
[email protected]::myChildCloseHandler()();
});
}-*/;
See also: https://code.google.com/p/google-web-toolkit/issues/detail?id=7822
Upvotes: 1