Skip to content

Node.js setInterval #7

Answered by Winterreisender
faveoled asked this question in Q&A
Jan 26, 2023 · 5 comments · 7 replies
Discussion options

You must be logged in to vote

This could be a workaround:

let w = new Webview(true);
w.navigate("about:blank");
w.bind("foo", (w) => {
    // write you setInterval code here
    console.log("Hello");
    
});
w.init("setInterval(foo,1000)");
w.show();

it uses the setInterval in browser and call the function which is bound to the Node.js. I tested on my machine and it works.

It may be a design of webview that, once you started the webview, you should consider the webview as the main place to write code, node.js and other backend should only deal with code that could not be done in webview

Replies: 5 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@faveoled
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@JoCat
Comment options

Comment options

You must be logged in to vote
5 replies
@faveoled
Comment options

@Winterreisender
Comment options

@faveoled
Comment options

@Winterreisender
Comment options

@faveoled
Comment options

Answer selected by faveoled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
3 participants