deno_webview

license stars ci GitHub Releases Deno version

Still in a early stage of development. deno_webview uses the rust bindings for zserge’s webview.

Example image

Example

Run the following with the -A flag enabled to get the example shown above:

import { WebView } from "https://deno.land/x/webview/mod.ts";

const webview1 = new WebView({
    title: "Hello world",
    url: `data:text/html,
    <html>
    <body>
      <h1>Hello from deno</h1>
    </body>
    </html>
    `,
    width: 300,
    height: 300,
    frameless: true
});

const webview2 = new WebView({
    title: "Hello world 2",
    url: `data:text/html,
  <html>
  <body>
    <h1>Hello from deno 2</h1>
  </body>
  </html>
  `,
  width: 300,
  height: 300
});

while (webview1.step() && webview2.step()) {}

or just run the following in the terminal:

deno -A https://deno.land/x/webview/example.ts

Docs

Docs can be found here.

Todo

  • Implement all most webview instance methods
  • Docs
  • Multiple windows/instances? (Help, need to create a static HashMap of *mut CWebView) Used solution found here
  • Better errors and responses from rust land
  • Update ci so building with Edge works #3
  • Two-way deno bindings (to call deno from javascript)
  • More examples
  • Tests
  • Wait for the rust bindings to update to the latest webview api.
    • Polyfill for new API?