mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Migrate EventTarget
event firing functions to use Atom
s.
This allows us to utilize more `atom` macros.
This commit is contained in:
parent
80575c3d2e
commit
f447040ea9
16 changed files with 42 additions and 33 deletions
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue