[whatwg] window.location aborting the parser and subsequent document.writes

On Tue, Feb 14, 2012 at 2:43 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Thu, 5 Jan 2012, Henri Sivonen wrote:
>>
>> Consider https://bug98654.bugzilla.mozilla.org/attachment.cgi?id=77369
>> with the popup blocker disabled.
>>
>> Chrome, Opera and IE open a new window/tab and load the Mozilla front
>> page into it. Firefox used to but doesn't anymore.
>>
>> As far as I can tell, Firefox behaves according to the spec: Setting
>> window.location aborts the parser synchronously and the first subsequent
>> document.write() then implies a call to document.open(), which aborts
>> the navigation started by window.location.
>
> Per spec, aborting the parser doesn't cause document.write() to imply a
> call to document.open(). Specifically, it leaves the insertion point in a
> state that is defined, but with the parser no longer active, and
> discarding any future data added to it.

That an aborted parser keep having a defined insertion point was
non-obvious. Thanks. Fixed in Gecko on trunk.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/

Received on Friday, 30 March 2012 05:15:16 UTC