On Web, cache commonly used values (#2947)

This commit is contained in:
daxpedda
2023-07-11 00:11:06 +02:00
committed by Kirill Chibisov
parent 1d80005b91
commit 297c3f80eb
7 changed files with 131 additions and 126 deletions

View File

@@ -4,4 +4,6 @@ disallowed-methods = [
{ path = "web_sys::HtmlCanvasElement::height", reason = "Winit shouldn't touch the internal canvas size" },
{ path = "web_sys::HtmlCanvasElement::set_width", reason = "Winit shouldn't touch the internal canvas size" },
{ path = "web_sys::HtmlCanvasElement::set_height", reason = "Winit shouldn't touch the internal canvas size" },
{ path = "web_sys::Window::document", reason = "cache this to reduce calls to JS" },
{ path = "web_sys::Window::get_computed_style", reason = "cache this to reduce calls to JS" },
]