Skip to content

Commit

Permalink
Fixing the set_timeout failing in dev profile (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
whizsid authored Nov 17, 2024
1 parent 7a5f83f commit 4c318c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extern "C" {
this: &GlobalScope,
handler: &::js_sys::Function,
timeout: i32,
) -> Result<i32, wasm_bindgen::JsValue>;
) -> Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>;
}

pub fn performance_now() -> f64 {
Expand All @@ -32,7 +32,7 @@ pub fn performance_now() -> f64 {
pub fn set_timeout(
handler: &::js_sys::Function,
timeout: i32,
) -> Result<i32, wasm_bindgen::JsValue> {
) -> Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue> {
let global_this: Object = js_sys::global();
let global_scope = global_this.unchecked_ref::<GlobalScope>();
global_scope.set_timeout_with_callback_and_timeout_and_arguments_0(handler, timeout)
Expand Down

0 comments on commit 4c318c8

Please sign in to comment.