Closed Bug 297323 Opened 20 years ago Closed 20 years ago

Elements printed out with document.write() are put in a wrong place of the domtree, when using javascript-include

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 271184

People

(Reporter: tschlottke, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050523 Firefox/1.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050523 Firefox/1.0+

As you can easily see on the demo-page, the last line of our test-text is NOT
printed inside the div. it is printed in script2.js, which is being included
inside the div.

For a workaround, you shoud have a look at script1-workaround.js. It basically
does the same thing as script1.js, but has div after the script2.js-include,
which has no content and is closed in XHTML style.

Reproducible: Always

Actual Results:  
The text printed in script2.js is always be printed AFTER the <div> which is
printed in script1.js

Expected Results:  
The text printed in script2.js should always be printed INSIDE the <div> which
is printed in script1.js

This occurs in all programs using gecko, in new and older versions.
It also occurs in Internet Explorer 6.

The only browser we found which rendered it correctly is konqueror/KTHML.
I suspect this was fixed by the checkin for bug 271184 (since I cannot reproduce
it), so I'm going to mark it a duplicate. Tobias, if you can still reproduce
this on a current nightly build, please reopen.

*** This bug has been marked as a duplicate of 271184 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.