Hello, I'm trying to run componentize for a simple API that uses setTimeout
:
export const api = {
"checkout": function () {
setTimeout(() => {
console.log("Checking out.");
}, 1000);
}
}
And I'm getting this error when running the component: ReferenceError: setTimeout is not defined
, is there a way to solve that problem?
I've created a GitHub issue as well: https://github.com/bytecodealliance/componentize-js/issues/56
setTimeout is not in the list of exposed functions from spidermonkey: https://github.com/bytecodealliance/componentize-js#native-functions
Hi Jorge, we're working on implementing the event loop over the next couple of weeks, it's the number one priority for the project right now. So we should have an updated on it very soon!
ohhh, great, thank you for your answers!
Hi. Any update on the event loop support? Excited to get this in!
Adam Fraser said:
Hi. Any update on the event loop support? Excited to get this in!
Unfortunately, getting WASI support has taken over as a priority here. So others may wish to pick this up.
Guy Bedford said:
Adam Fraser said:
Hi. Any update on the event loop support? Excited to get this in!
Unfortunately, getting WASI support has taken over as a priority here. So others may wish to pick this up.
I hope to be able to work on it again next year.
Last updated: Nov 22 2024 at 17:03 UTC