webview_deno icon indicating copy to clipboard operation
webview_deno copied to clipboard

deno --watch flag doesn't work while webview is running

Open ozaner opened this issue 9 months ago • 0 comments

Consider this minimal example:

import { Webview } from "https://deno.land/x/[email protected]/mod.ts";

const html = `
  <html><body>
    <h1>Hello from deno v${Deno.version.deno}</h1>
  </body></html>`;

const webview = new Webview();
webview.navigate(`data:text/html,${encodeURIComponent(html)}`);
webview.run();

Run the program with deno run -A --unstable --watch index.ts. You'll find that deno no longer restarts the program when a file is changed. It seems that after webview.run() is called, watcher events are blocked.

I'm using the latest version of deno as of writing (v1.36.4).

ozaner avatar Sep 19 '23 01:09 ozaner