Created attachment 425630 [details] [diff] [review] Patch to only fire events if we err before hitting network. We currently for <img>s and other resources fire an "error" event if the loading of the resource fails. However we don't currently do this for <iframe>s (or any other frames). Additionally calling |iframe.setAttribute("src", ...)| or |iframe.src = ...| throws an exception if the uri is file-url or any other url where CheckMayLoad fails. This should not happen since setting the attribute does in fact succeed. Patch coming up to make us fire "error" events in a few of the cases where we should. It so far only fires the event if we fail to kick off the load. I.e. if we fail before we even hit the network. I'm a little concerned about firing the event at more times since it will allow for probing for servers. So so far only firing if we fail for non-network related reasons. I've tested that the patch works over in bug 543870. But need to write specific tests for this bug.
propagate is misspelled as propagage in a comment
(In reply to comment #0) > But need to write specific > tests for this bug. Indeed. For each case an error event is fired. HTML 5 draft isn't explaining too well when to fire error "When content fails to load (e.g. due to a network error), then the user agent must queue a task to fire a simple event named error at the element instead."
(Oh, HTML5 draft may have a bug in iframe load event handling. Not related to this bug though.)
Comment on attachment 425630 [details] [diff] [review] Patch to only fire events if we err before hitting network. r+, if tests are written before committing.