mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Pass around event types as Atoms instead of Strings
`Event` internally stores the `type` as an `Atom`, and we're `String`s everywhere, which can cause unnecessary allocations to occur since they'll end up as `Atom`s anyways.
This commit is contained in:
parent
996c0a60b8
commit
4accaf50b2
25 changed files with 156 additions and 135 deletions
|
@ -850,13 +850,13 @@ impl Activatable for HTMLInputElement {
|
|||
let target = self.upcast();
|
||||
|
||||
let event = Event::new(GlobalRef::Window(win.r()),
|
||||
DOMString::from("input"),
|
||||
atom!("input"),
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::NotCancelable);
|
||||
event.fire(target);
|
||||
|
||||
let event = Event::new(GlobalRef::Window(win.r()),
|
||||
DOMString::from("change"),
|
||||
atom!("change"),
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::NotCancelable);
|
||||
event.fire(target);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue