The default bug view has changed. See this FAQ.

Add support for XHR's loadend event

RESOLVED FIXED

Status

()

Core
DOM: Events
RESOLVED FIXED
9 years ago
6 years ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

({dev-doc-complete})

Trunk
x86
Linux
dev-doc-complete
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Loadend event has been added to http://dev.w3.org/cvsweb/~checkout~/2006/webapi/progress/Progress.html?rev=1.25
XHR2 should be updated before this, and also HTML 5.
I think XHR2/upload should have property onloadend, not sure about <video>/<audio>
<audio> / <video> seem to have a bit different kind of use for progress events
and they have more events. So not even sure if loadend is useful there.
I talked to hixie about this. His feeling was that it seemed to make sense for audio/video too given that we have load/abort/error there too.
Summary: Add support for loadend event → Add support for XHR's loadend event
Created attachment 519217 [details] [diff] [review]
patch
Attachment #519217 - Flags: review?(jonas)
Comment on attachment 519217 [details] [diff] [review]
patch

Yay!
Attachment #519217 - Flags: review?(jonas) → review+
Actually, could you add this event to the cross-site XHR tests too by adding loadend to the list here:

http://mxr.mozilla.org/mozilla-central/source/content/base/test/file_CrossSiteXHR_inner.html?force=1#28

and change the code here to use the loadend event instead:
http://mxr.mozilla.org/mozilla-central/source/content/base/test/file_CrossSiteXHR_inner.html?force=1#51

It's unfortunately a bit of a pain since you also need to update

file_CrossSiteXHR_inner.jar
file_CrossSiteXHR_inner_data.sjs

:(
Could you explain that whole CORS testing setup?
Why the need for .jar?
Depends on: 644568
I'll push the patch, since it does tests all the parts already, but
we certainly should have tests for xsite+loadend too.
Filed a followup for that.
http://hg.mozilla.org/mozilla-central/rev/3a362ae1d54c
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Created attachment 522046 [details] [diff] [review]
Fix CORS-tests to also check for loadend
Attachment #522046 - Flags: review?(Olli.Pettay)
Attachment #522046 - Flags: review?(Olli.Pettay) → review+
Checked in CORS tests

http://hg.mozilla.org/mozilla-central/rev/2ecbb2d07d85
Keywords: dev-doc-needed
Documentation updated:

https://developer.mozilla.org/en/XPCOM_Interface_Reference/NsIXMLHttpRequestEventTarget
https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Detecting_any_load_end_condition

And listed on Firefox 5 for developers.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.