Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Game-Development-with-Rust-and-WebAssembly
/ document
Function
document
src/browser.rs:31–35 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
29
}
30
31
pub fn document() -> Result<Document> {
32
window()?
33
.document()
34
.ok_or_else(|| anyhow!(
"No Document Found"
))
35
}
36
37
pub fn canvas() -> Result<HtmlCanvasElement> {
38
document()?
Callers
4
test_transition_from_game_over_to_new_game
Function · 0.85
canvas
Function · 0.85
find_ui
Function · 0.85
find_html_element_by_id
Function · 0.85
Calls
1
window
Function · 0.85
Tested by
1
test_transition_from_game_over_to_new_game
Function · 0.68