mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Web: Fullscreen Overhaul (#3063)
This commit is contained in:
@@ -49,6 +49,14 @@ impl AnimationFrameHandler {
|
||||
|
||||
self.handle.set(Some(handle));
|
||||
}
|
||||
|
||||
pub fn cancel(&mut self) {
|
||||
if let Some(handle) = self.handle.take() {
|
||||
self.window
|
||||
.cancel_animation_frame(handle)
|
||||
.expect("Failed to cancel animation frame");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for AnimationFrameHandler {
|
||||
|
||||
Reference in New Issue
Block a user