This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7917 - document.close() should attempt to tokenize
Summary: document.close() should attempt to tokenize
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: NE
Depends on:
Blocks:
 
Reported: 2009-10-14 11:56 UTC by Henri Sivonen
Modified: 2010-10-04 14:28 UTC (History)
4 users (show)

See Also:


Attachments

Description Henri Sivonen 2009-10-14 11:56:51 UTC
It seems that the current spec definition of document.close() matches Gecko. However, Trident, WebKit and Presto all try to tokenize synchronously on document.close() in addition to inserting the EOF character in the stream.

Presto seems to tokenize to EOF. WebKit tokenizes until EOF or the earliest external-script </script> whichever comes first.

Trident tokenizes but I'm not sure how far. (I gave up testing before I found out.)

Since 3 out of 4 tokenize at least somewhat, I think document.write() should attempt to tokenize. However, I think it should bail out if the tokenization causes the parser to block, since that's more implementable in Gecko than what Presto does.

Live DOM URLs of interest:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/276
Shows that Gecko doesn't tokenize but WebKit and Presto tokenize.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/277
Shows that Trident tokenizes.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/278
Shows that WebKit bails out but Presto doesn't.
Comment 1 Ian 'Hixie' Hickson 2009-10-21 08:18:03 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 2 contributor 2009-10-21 08:18:33 UTC
Checked in as WHATWG revision r4241.
Check-in comment: Make document.close() more evil.
http://html5.org/tools/web-apps-tracker?from=4240&to=4241