W3C home > Mailing lists > Public > public-html@w3.org > July 2009

Re: document.write from script-inserted external script

From: Henri Sivonen <hsivonen@iki.fi>
Date: Thu, 16 Jul 2009 14:59:57 +0300
Cc: Ian Hickson <ian@hixie.ch>, HTMLWG WG <public-html@w3.org>, Kirk Sykora <ksykora@microsoft.com>
Message-Id: <3693C5C2-3E5E-4678-BFB5-DAB32C713B59@iki.fi>
To: Travis Leithead <travil@microsoft.com>
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>





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

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:51 UTC