On Sat, 29 Jan 2011 16:56:55 -0000, mcot <[email protected]> wrote:

On IE6, the last part is executed because IE uses attachEvent instead
of addEventListener.  I am confused about the document.write() of a
script with defer followed by the $(<some element>).  That would imply
the script tag is written/added to the DOM immediately.

With document.write you should not expect any consistency or even sanity in its behavior :)

It behaves differently depending on (among other things) content you write and whether there are any "pending" scripts:

http://www.whatwg.org/specs/web-apps/current-work/multipage/apis-in-html-documents.html#document.write() ← see point 6
http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#pending-parsing-blocking-script

--
regards, porneL

--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to