[whatwg] Details on window.open

Ian Hickson ian at hixie.ch
Mon Jul 15 13:44:42 PDT 2013


On Tue, 18 Dec 2012, Boris Zbarsky wrote:
> On 12/18/12 3:53 PM, Ian Hickson wrote:
> > Per the spec, calls that would create a new browsing context are 
> > blocked unless called from the handler of a trusted 'click' event.
> 
> That's not web-compatible...
> 
> > I don't know if the spec is overly strict here; maybe it should also be
> > possible on other trusted events e.g. mousedown or keydown?
> 
> Gecko's current behavior is as follows: [...]
> 
> I strongly suggest talking to all UA vendors about how their popup 
> blockers actually worked.  The Gecko setup used to be simpler, but we've 
> had to add complications to it as we came across site compat issues...

I've tried to spec something that's close to what you describe and what 
other vendors have described to me. It's better, but it's still not 
perfect; if there's some way in which it is inadequate, please don't 
hesitate to report it.


> > I haven't tried to spec it, because as far as I can tell, UAs could 
> > completely ignore it with no ill effects. If I'm wrong about this, 
> > then we should spec something.
> 
> I think on desktop you're somewhat wrong (e.g. it's possible to get site 
> compat bugs where you open a window at the wrong size and users can't 
> get to content)...

Can't they just resize the window or scroll it? What happens on UAs that 
don't have sized windows, like most implementations of browsers on phones?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list