[whatwg] When do scripts execute? (4.3.1)

Kartikaya Gupta wrote:
>  sn = document.createElement( 'script' );
>  sn.setAttribute( 'type', 'text/javascript' );
>  document.body.appendChild( sn );        // this *should* run an empty script block and do nothing

That looks like a bug in the spec to me.  Empty scripts with no @src are 
not executed when inserted into the DOM, and are executed if they ever 
become nonempty or have their src set.

-Boris

Received on Thursday, 15 January 2009 08:28:10 UTC