Content dynamically added to window created with window.open() not displayed

RESOLVED DUPLICATE of bug 598895

Status

()

Core
DOM: Core & HTML
RESOLVED DUPLICATE of bug 598895
7 years ago
7 years ago

People

(Reporter: Biju, Unassigned)

Tracking

({testcase})

Trunk
x86
Windows Vista
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
Mozilla/5.0 (Windows NT 6.0; rv:2.0b8pre)
Gecko/20101114 Firefox/4.0b8pre

Content dynamically added to window created with window.open() not displayed

Steps:-
1. copy the script below ===== JS Script =====
2. Goto http://w3l.sourceforge.net/eval.html
3. paste clipboard content to first TEXTAREA
4. press "do" button

Expected:-
  New window should open,
  then in 1 seconds it should display  "changed 1"
  in 2 seconds it should display  "changed 2" as second para
  in 3 seconds the page title should display content of innerhtml

Actual:-
  only page title changes
  in 3 seconds the page title display content of innerhtml


 ===== JS Script =====

function abc() {
    var win = open();
    setTimeout(timeout1, 1000);
    setTimeout(timeout2, 2000);
    setTimeout(timeout3, 3000);


    function timeout1() {
        win.document.title = "changed 1";
        win.document.body.innerHTML = "<p>changed 1</p>";
    }

    function timeout2() {
        win.document.title = "changed 2";
        var n = win.document.createElement("p");
        var t = win.document.createTextNode("changed 2");
        n.appendChild(t);
        win.document.body.appendChild(n)
    }

    function timeout3() {
        win.document.title = win.document.body.parentNode.innerHTML;
    }
}
abc()
(Reporter)

Comment 1

7 years ago
But if I modify code to say 

 var win = open("about:blank");

it works
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 598895
You need to log in before you can comment on or make changes to this bug.