[whatwg] script element onerror event

Mike Wilson mikewse at hotmail.com
Sun May 29 11:55:25 PDT 2011


Mike Wilson wrote:

John J. Barton wrote:

Step 14 is unclear or incomplete however:
" If the src
<http://www.whatwg.org/specs/web-apps/current-work/#attr-script-src>
attribute's value is the empty string or if it could not be resolved,..."

Does this mean the error handler will be called in the case of 4XX, 5XX, and
syntax errors?

If you follow the algorithm a bit further down you have this in step 15.2:

If the load resulted in an error (for example a DNS error, or an HTTP 404
error)
Executing the script block must just consist of firing a simple event named
error at the element. 

Oops, this section isn't step 15.2, it's below it. 
Here's the link:
http://www.whatwg.org/specs/web-apps/current-work/#execute-the-script-block
 
Best regards
Mike
 



More information about the whatwg mailing list