Add auxiliary method to EventTargetHelpers for events without target

fixup! Add auxiliary method to EventTargetHelpers for events without target
This commit is contained in:
thiagopnts 2014-12-14 02:38:29 -02:00 committed by Thiago Pontes
parent 1bc2c8a639
commit 79487252ca
7 changed files with 21 additions and 15 deletions

View file

@ -817,7 +817,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
"readystatechange".to_string(),
DoesNotBubble, Cancelable).root();
let target: JSRef<EventTarget> = EventTargetCast::from_ref(self);
target.dispatch_event_with_target(None, *event).ok();
target.dispatch_event(*event);
}
fn process_partial_response(self, progress: XHRProgress) {
@ -957,7 +957,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
EventTargetCast::from_ref(self)
};
let event: JSRef<Event> = EventCast::from_ref(*progressevent);
target.dispatch_event_with_target(None, event).ok();
target.dispatch_event(event);
}
fn dispatch_upload_progress_event(self, type_: DOMString, partial_load: Option<u64>) {