9 <p>This tests cloning a script element that has already started and inserting it into the document does not re-run the script. You should see PASS:
</p>
10 <div><script> i
++ </script></div>
13 if (window
.testRunner
)
14 testRunner
.dumpAsText();
16 var script
= document
.getElementsByTagName('script')[1];
17 var div
= script
.parentNode
;
18 div
.removeChild(script
);
19 div
.appendChild(script
.cloneNode(true));
23 result
= 'FAIL: script ran twice';
25 result
= 'FAIL: script ran ' + i
+ ' times';
26 document
.body
.appendChild(document
.createTextNode(result
));