mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -330,7 +330,9 @@ impl Runnable for EventRunnable {
|
|||
|
||||
fn handler(self: Box<EventRunnable>) {
|
||||
let target = self.target.root();
|
||||
target.fire_event_with_params(&*self.name, self.bubbles, self.cancelable);
|
||||
let bubbles = self.bubbles.clone();
|
||||
let cancelable = self.cancelable.clone();
|
||||
target.fire_event_with_params(self.name, bubbles, cancelable);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,6 +347,6 @@ impl Runnable for SimpleEventRunnable {
|
|||
|
||||
fn handler(self: Box<SimpleEventRunnable>) {
|
||||
let target = self.target.root();
|
||||
target.fire_event(&*self.name);
|
||||
target.fire_event(self.name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue