Re: document.write from script-inserted external script

On Jul 13, 2009, at 20:40, Travis Leithead wrote:

> Note, we also tested this with IE8+parser fix we've been looking  
> into and our result is:
>
>>> We sometimes succeed and sometimes fail. (I'm guessing it's a  
>>> timing issue with the script download)
>>> When we succeed it looks like Firefox with more whitespace and  
>>> "Kittens! Budgies!" before "BEFORE ... ... AFTER" instead of after.


I tweaked my patch to accept document.writes to document.opened  
documents from scripts that aren't the opener script and now I get:
<p title="Test" class="Test"></p> <script> var s =  
document.createElement("script"); s.src = "005a.js";  
document.body.appendChild(s); document.getElementsByTagName("P") 
[0].setAttribute("title", "Test"); </script> <p>BEFORE... ...AFTER</p>  
<script> document.getElementsByTagName("P")[0].setAttribute("class",  
"Test"); </script><p>Kittens!</p><script src="005b.js"></script>

BEFORE... ...AFTER

Kittens!

Budgies!

TESTING


-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Thursday, 16 July 2009 12:00:42 UTC