MCPcopy Index your code
hub / github.com/RustPython/RustPython / document

Function document

crates/wasm/src/browser_module.rs:180–188  ·  view source on GitHub ↗
(_vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

178
179 #[pyattr]
180 fn document(_vm: &VirtualMachine) -> PyRef<Document> {
181 PyRef::new_ref(
182 Document {
183 doc: window().document().expect("Document missing from window"),
184 },
185 Document::make_static_type(),
186 None,
187 )
188 }
189
190 #[pyattr]
191 #[pyclass(module = "browser", name)]

Callers

nothing calls this directly

Calls 2

windowFunction · 0.85
documentMethod · 0.80

Tested by

no test coverage detected