Closed
Bug 595845
Opened 15 years ago
Closed 15 years ago
Body Element Non-Existant
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jeresig, Unassigned)
References
()
Details
(See linked to test page)
This page runs a simple css box model test 2 times: first immediately when the script is loaded, and again in a script tag at the end of the body element. Browsers that properly support the box model (I tested Chrome, Safari, Firefox 3.6 and older, Opera, IE 6,7,8, and more) will pass both tests. Old browsers like IE 5.5 will always fail the test due to their lack of proper box model support, which is the expected result.
Oddly, despite its proper box model support, Firefox 4 (4.0b4) will fail the first time and pass the second time.
As a result of this, JavaScript libraries such as jQuery, EnhanceJS, and Modernizr will need to wait for the body element to be present before running similar capability tests on the browser. The only workaround I've found is to wait for document.body to load before running the tests. Unfortunately, this means any logic based on the test result (such as loading additional scripts and styles for capable browsers) will be delayed.
** This will cause existing versions of jQuery to break. **
Reporter | ||
Updated•15 years ago
|
Summary: Body Element Injection Failing → Body Element Non-Existant
Comment 2•15 years ago
|
||
So when I load the test case using a recent nightly, I get pass in both cases.
Reporter | ||
Comment 3•15 years ago
|
||
Huh, yep - I can confirm that it's been fixed since the last beta. Sorry for the hassle!
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Updated•15 years ago
|
blocking2.0: ? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•