Why is Window.open()'s return type void?

Doing something like this is perfectly permissible in javascript:

var newWindow = window.open(...)

However, this does not work in the senario of GWT (I am using 1.5 I dont know about later versions),

Window window = Window.open("", "", "");

Throws me a compile time error that the open is a method with a return type as void.

Why should it be void ? What if i want to close my popup from the main Window ? how do I get its handle ?

I will have to resort to native javascript no doubt but i was just curious so as to why this is so...


I don't know exactly why GWT doesn't support what you're asking for but there is a ticket requesting multiple window support where a number of workarounds are discussed in some detail.

Need Your Help

ROAR: What are the benefits over jbuilder or rabl?

ruby-on-rails-3 rails-roar

I've read through https://github.com/apotonick/roar and it seems like a lot of thought has been put into ROAR. But in the context of a fairly standard Rails-powered JSON API that uses jbuilder, I'm...

Snapshot HTML pages then convert to image using node.js and phantom

node.js webkit phantomjs webpage-screenshot

I'm trying to create an image snaphot of my website using node-weshot which depends on phantomjs. It work as expected on my local machine, but when I deploy it on a live server. It just keeps firin...