Created attachment 159259 [details] testcase note: setting bgColor from onload works just fine, as does setting it from link click
dbaron's comment in http://lxr.mozilla.org/seamonkey/source/content/html/document/src/nsHTMLDocument.cpp#2710 seems to be exactly the case here: alert(document.body) alerts null in this testcase (when put before the document.bgColor setting); and it alerts [object HTMLBodyElement] if put after a document.write. could this code just create the body element in such a case?
Assignee: general → general
Status: UNCONFIRMED → NEW
Component: Browser-General → DOM: HTML
Ever confirmed: true
QA Contact: general → ian
A more permanent URL for that is: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/html/document/src/nsHTMLDocument.cpp&rev=3.583&mark=2718#2710
> could this code just create the body element in such a case? Not without majorly confusing the content sink if this is done during parsing.
We match HTML5 here. See <http://www.whatwg.org/html5/#dom-document-bgcolor>.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.