Implement EventTarget::fire_simple_event and EventTarget::fire_simple_event_params

This commit is contained in:
Arthur Skobara 2015-12-20 12:52:28 +06:00
parent df087cc6cf
commit d38771e270
8 changed files with 61 additions and 71 deletions

View file

@ -126,11 +126,7 @@ impl Worker {
pub fn dispatch_simple_error(address: TrustedWorkerAddress) {
let worker = address.root();
let global = worker.r().global.root();
let event = Event::new(global.r(),
atom!("error"),
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable);
event.fire(worker.upcast());
worker.upcast().fire_simple_event("error", global.r());
}
pub fn handle_error_message(address: TrustedWorkerAddress, message: DOMString,