Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wasm
  • Loading branch information
ShaharNaveh committed May 15, 2026
commit e8d4969e08856feaf1b906ef0d57134dacc65392
8 changes: 4 additions & 4 deletions crates/wasm/src/browser_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod _browser {
Ok(match s {
"json" => Self::Json,
"text" => Self::Text,
"array_buffer" => Ok(Self::ArrayBuffer),
"array_buffer" => Self::ArrayBuffer,
_ => return Err(vm.new_type_error("Unknown fetch response_format")),
})
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
Expand Down Expand Up @@ -178,12 +178,12 @@ mod _browser {
}

#[pyattr]
fn document(_vm: &VirtualMachine) -> PyRef<Self> {
fn document(_vm: &VirtualMachine) -> PyRef<Document> {
PyRef::new_ref(
Self {
Document {
doc: window().document().expect("Document missing from window"),
},
Self::make_static_type(),
Document::make_static_type(),
None,
)
}
Expand Down
8 changes: 4 additions & 4 deletions crates/wasm/src/js_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ mod _js {
}

#[pymethod]
fn null(&self) -> PyJsValue {
Self::new(Self::NULL)
fn null(&self) -> Self {
Self::new(JsValue::NULL)
}

#[pymethod]
fn undefined(&self) -> PyJsValue {
Self::new(Self::UNDEFINED)
fn undefined(&self) -> Self {
Self::new(JsValue::UNDEFINED)
}

#[pymethod]
Expand Down
Loading