-
Notifications
You must be signed in to change notification settings - Fork 776
Closed
Labels
Category: APIComponent: HTML ReporterType: BugSomething isn't working right.Something isn't working right.
Milestone
Description
Tell us about your runtime:
- QUnit version: 2.6.1
- What environment are you running QUnit in? (e.g., browser, Node): Browser
- How are you running QUnit? (e.g., script, testem, Grunt): grunt
What are you trying to do?
If the contents of "#qunit" is extracted with innerHTML and written to a HTML file, the resultant HTML is invalid. This is because "#qunit-testresult" is created as a "p" and its innerHTML is filled with several "divs" like "#qunit-testresult-display" and "#qunit-testresult-controls".
The problem is that a "div" element is not valid content of a "p". In fact the HTML spec states that a "p" followed by a "div" should assume that the end tag of the "p" has been omitted.
The result of parsing <p id=qunit-testresult"><div id=qunit-testresult-display /></p> is an empty "p" element with the "divs" as siblings. This breaks any CSS used to format this section.
The fix is to make "#qunit-testresult" a "div" instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Category: APIComponent: HTML ReporterType: BugSomething isn't working right.Something isn't working right.