pub fn canvas(id: &str) -> Option<HtmlCanvasElement>
Convenience function to access the web_sys::HtmlCanvasElement. /// Note: Returns None if there is no element with the given id or the element isn’t HtmlCanvasElement.
web_sys::HtmlCanvasElement
None
id
HtmlCanvasElement