mirror of
https://github.com/servo/servo.git
synced 2025-06-25 17:44:33 +01:00
Implement Window.set/clearInterval.(fixes #2116)
This commit is contained in:
parent
896cadbf62
commit
b7dcf62ed0
5 changed files with 92 additions and 13 deletions
|
@ -660,9 +660,15 @@ impl ScriptTask {
|
|||
let frame = page.frame();
|
||||
let mut window = frame.get_ref().window.clone();
|
||||
|
||||
let timer_handle = window.get_mut().active_timers.pop(&timer_data.handle);
|
||||
if timer_handle.is_none() {
|
||||
return;
|
||||
{
|
||||
let timer_handle = window.get().active_timers.find(&timer_data.handle);
|
||||
if timer_handle.is_none() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if !timer_data.is_interval {
|
||||
window.get_mut().active_timers.remove(&timer_data.handle);
|
||||
}
|
||||
|
||||
let js_info = page.js_info();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue