webview_deno icon indicating copy to clipboard operation
webview_deno copied to clipboard

two examples on the main page might need to be updated

Open ds604 opened this issue 3 months ago • 1 comments

If I try to run this example from the main page

deno run -Ar --unstable https://deno.land/x/webview/examples/local.ts

I get the following error:

Warning Implicitly using latest version (0.8.0) for https://deno.land/x/webview/examples/local.ts
error: Relative import path "@denosaurs/plug" not prefixed with / or ./ or ../
    at https://deno.land/x/[email protected]/src/ffi.ts:3:34

The example above this one gives the same error. Adding the jsr prefix lets it run correctly:

deno run -Ar --unstable - <<-"EOF"
import { Webview } from "jsr:@webview/webview";

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

ds604 avatar Apr 03 '24 14:04 ds604