Closed Bug 311425 Opened 14 years ago Closed 9 years ago
allow setting On
Progress after XMLHttp Request::open()
since all the other m* can be set even after open is called, so should OnProgress. The issue here is that this affects the load flags of the channel (must clear LOAD_BACKGROUND). But, load flags can be set just fine after channel creation. http://lxr.mozilla.org/seamonkey/source/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp#939
We could easily make it possible to set onprogress up until the point where send is called.
So all we need to do is change the channel's flags when onprogress is set or addEventListener is called for the "progress" event, right?
Yeah. Do we have to worry about when mScriptContext is assigned? It seems to be assigned from several of the "on" property setters.
Flags: blocking1.9a2? → blocking1.9-
Smaug: you wanna have a look at this since this affects the newly added progress events. Ideally you would request progress events even on background channels :(
Sure, I can take this.
Assignee: xml → Olli.Pettay
Depends on: 435425
I think we should do this, at least for now. Changing background loading would need changes to necko. Still trying to figure out how to test this reliably. (progress events are dispatched only every 50ms or so)
Attachment #473024 - Flags: review?(jonas)
Attachment #473024 - Flags: review?(jonas) → review+
Comment on attachment 473024 [details] [diff] [review] patch Passed tryserver tests.
Attachment #473024 - Flags: approval2.0?
blocking2.0: ? → -
Attachment #473024 - Flags: approval2.0? → approval2.0+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.