[whatwg] Details on window.open

Boris Zbarsky bzbarsky at MIT.EDU
Mon Oct 8 13:37:04 PDT 2012


On 10/7/12 6:32 AM, David Bruant wrote:
> 1) what are the rules for popup blockers?

Browser-dependent.

Gecko uses a combination of several heuristics to block popups, based on 
what sort of platform event are being processed when the window.open 
call happens, how many popups are already open, which exact site the 
call is on, etc.

> Is every call to window.open blocked in modern browsers or are there exceptions?

Well, onclick="window.open()" usually works.

It might be good to come up with a cross-browser list of cases like that 
that content actually depends on.

> 2) About the third argument, is there a somewhat interoperable overlap
> in implementations or is it just an intricable mess?

The latter, especially across different kinds of devices and different 
browser UIs.

If you limit to desktop browsers, there's some agreement on what the 
width and height of the resulting window should be... assuming it's 
actually a window that opens, not a tab.

> 3) Is what is returned a instance of Window or WindowProxy?

Web page script never has direct access to a Window. Whenever you have 
an object reference, it's always a WindowProxy.

-Boris




More information about the whatwg mailing list