mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -325,7 +325,7 @@ impl FetchResponseListener for StylesheetContext {
|
|||
if let Some(ref meta) = self.metadata {
|
||||
if let Some(Serde(ContentType(Mime(TopLevel::Text, SubLevel::Css, _)))) = meta.content_type {
|
||||
} else {
|
||||
self.elem.root().upcast::<EventTarget>().fire_event("error");
|
||||
self.elem.root().upcast::<EventTarget>().fire_event(atom!("error"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ impl FetchResponseListener for StylesheetContext {
|
|||
|
||||
document.finish_load(LoadType::Stylesheet(self.url.clone()));
|
||||
|
||||
let event = if successful { "load" } else { "error" };
|
||||
let event = if successful { atom!("load") } else { atom!("error") };
|
||||
|
||||
elem.upcast::<EventTarget>().fire_event(event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue