Migrate EventTarget event firing functions to use Atoms.

This allows us to utilize more `atom` macros.
This commit is contained in:
Corey Farwell 2016-11-02 23:49:52 -04:00
parent 80575c3d2e
commit f447040ea9
16 changed files with 42 additions and 33 deletions

View file

@ -15,6 +15,7 @@ use dom::promise::Promise;
use dom::serviceworker::ServiceWorker;
use dom::serviceworkerregistration::ServiceWorkerRegistration;
use script_thread::ScriptThread;
use servo_atoms::Atom;
use std::ascii::AsciiExt;
use std::default::Default;
use std::rc::Rc;
@ -45,7 +46,7 @@ pub trait Controllable {
impl Controllable for ServiceWorkerContainer {
fn set_controller(&self, active_worker: &ServiceWorker) {
self.controller.set(Some(active_worker));
self.upcast::<EventTarget>().fire_event("controllerchange");
self.upcast::<EventTarget>().fire_event(Atom::from("controllerchange"));
}
}