Don't unnecessarily clone canvas on Web (#2934)

This commit is contained in:
daxpedda 2023-07-08 17:05:05 +02:00 committed by GitHub
parent 96c0b267e2
commit 4652d48105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,8 +121,8 @@ pub fn is_fullscreen(window: &web_sys::Window, canvas: &HtmlCanvasElement) -> bo
match document.fullscreen_element() { match document.fullscreen_element() {
Some(elem) => { Some(elem) => {
let raw: Element = canvas.clone().into(); let canvas: &Element = canvas;
raw == elem canvas == &elem
} }
None => false, None => false,
} }