-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] Timers should be usable in Node.js environment #176
Comments
Methods such as |
I would also like to have timers working in node.js because it is one of the blocking issues that prevents the |
Assuming that #[wasm_bindgen]
extern {
#[wasm_bindgen(...)]
fn set_timeout(...) -> ...;
#[wasm_bindgen(...)]
fn set_interval(...) -> ...
} See relevant docs Feel free to PR this, @PhilippGackstatter. I would be happy to merge it |
Hey @hamza1311, would it be possible to publish a new |
@PhilippGackstatter just published a new patch version with this change. |
Describe the Bug
Trying to use timers while running in Node.js environment currently panics with:
gloo/crates/timers/src/callback.rs
Line 37 in 2245cd9
Steps to Reproduce
N/A
Expected Behavior
Timers work in Node.js environment.
Actual Behavior
Panic with error message:
Only supported in a browser or web worker
Additional Context
Similar to #106
The text was updated successfully, but these errors were encountered: