Skip to content

Limitations and Workarounds

Winterreisender edited this page Jan 29, 2023 · 7 revisions

1. Async function in Node.js won't work

Due to the limitations of webview, setInterval won't work after calling Webview.show(), even in Node.js Workers and other bindings.

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();

Related: https://github.com/Winterreisender/webview-nodejs/discussions/7

2. Can not set the icon of the window

Related: https://github.com/webview/webview#app-distribution

Feel free to edit! Any contribution to Wiki is welcomed!

Clone this wiki locally