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

Posted by Salvin Francis on Stack Overflow See other posts from Stack Overflow or by Salvin Francis
Published on 2010-04-01T05:33:00Z Indexed on 2010/04/01 5:33 UTC
Read the original article Hit count: 248

Filed under:
|
|

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...

© Stack Overflow or respective owner

Related posts about gwt

Related posts about JavaScript