W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > September 2010

[Bug 10521] Should say explicitly that parser-initiated script-running fails without setting 'already started' if the script is no longer in the document when the parser tries to run the script

From: <bugzilla@jessica.w3.org>
Date: Tue, 28 Sep 2010 11:05:47 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1P0Y0J-0005Qx-KU@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10521

--- Comment #2 from Simon Pieters <simonp@opera.com> 2010-09-27 12:41:00 UTC ---
I think something like:

<button onclick="s=document.getElementsByTagName('script')[0];
s.parentNode.removeChild(s)">remove</button>
<script>
// the parser has inserted the script element into the document
// server sleeps for a while here and you click on the button
alert(1);
</script>

(or by using setTimeout etc)

--- Comment #3 from Henri Sivonen <hsivonen@iki.fi> 2010-09-28 11:05:47 UTC ---
Or simply
<div>
<script>
// detach the div from the document
</script>
<script>
// this script won't be in the document when the parser tries to run it
</script>

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 28 September 2010 11:05:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:25 UTC