Closed
Bug 544642
Opened 14 years ago
Closed 14 years ago
<iframe>s should fire error event if load fails
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: sicking, Assigned: sicking)
References
Details
Attachments
(1 file)
17.58 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
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.
Attachment #425630 -
Flags: review?(Olli.Pettay)
Comment 1•14 years ago
|
||
propagate is misspelled as propagage in a comment
Comment 2•14 years ago
|
||
(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."
Comment 3•14 years ago
|
||
(Oh, HTML5 draft may have a bug in iframe load event handling. Not related to this bug though.)
Comment 4•14 years ago
|
||
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.
Attachment #425630 -
Flags: review?(Olli.Pettay) → review+
Assignee | ||
Comment 5•14 years ago
|
||
checked in http://hg.mozilla.org/mozilla-central/rev/ff870ef6501d
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•