Skip to content

Commit

Permalink
UPDATED DEFAULT METHOD IMPLEMENTATION OF JsTimers in components/scrip…
Browse files Browse the repository at this point in the history
…t/timers.rs
  • Loading branch information
jahielkomu authored and mrobinson committed Mar 27, 2024
1 parent 29d0e95 commit cf13963
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/script/timers.rs
Expand Up @@ -419,15 +419,17 @@ enum InternalTimerCallback {
}

impl Default for JsTimers {
pub fn default() -> Self {
fn default() -> Self {
JsTimers {
next_timer_handle: Cell::new(JsTimerHandle(1)),
active_timers: DomRefCell::new(HashMap::new()),
nesting_level: Cell::new(0),
min_duration: Cell::new(None),
}
}
}

impl JsTimers {
// see https://html.spec.whatwg.org/multipage/#timer-initialisation-steps
pub fn set_timeout_or_interval(
&self,
Expand Down

0 comments on commit cf13963

Please sign in to comment.