webview/webview_deno
关于
🌐 webview 的 Deno 绑定;webview 是一个用于创建基于 Web 的桌面 GUI 的轻量级库。
开发工具实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- -3
- 1个月
- -1
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文webview_deno
Webview is a tiny cross-platform library to make web-based GUIs for desktop applications.
⚠️ This project is still in development. Expect breaking changes.

Installation
Webview is published to jsr.io and deno.land. The recommended way to use it is to use JSR:
deno add jsr:@webview/webview
or without the CLI:
import { Webview } from "jsr:@webview/webview";
Example
import { Webview } from "@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();
You can run this example directly from the web:
deno run -Ar --unstable https://deno.land/x/webview/examples/local.ts
or in your development environment:
deno run -Ar --unstable examples/local.ts
you can find other examples in the examples/ directory.
Documentation
You can find the official documentation here.
Development
Prerequisites
Linux
- webkit2gtk (to install using apt:
sudo apt-get install libwebkit2gtk-4.0-dev)
Building
Make sure to init the webview submodule with:
$ git submodule update --init --recursive
Building on Windows requires admin privileges.
$ deno task build
Running
To run webview_deno without automatically downloading the binaries from
releases you will need to
use the environment variable PLUGIN_URL and set it to the path where the built
binaries are located. This is usually file://./target/release.
$ deno task build
$ PLUGIN_URL=./build/
$ deno run --unstable -A examples/local.ts
or
$ deno task run examples/local.ts
or if you have the webview library already built and didn't make any changes to it, you can skip the building step with:
$ deno task run:fast examples/local.ts
Environment variables
PLUGIN_URL- Set a custom library URL. Defaults to the latest release assets on Github. Setting this also disables cache forplug.
Dependencies
Other
Contribution
Pull request, issues and feedback are very welcome. Code style is formatted with
deno task fmt, linted with deno task lint and commit messages are done
following Conventional Commits
spec.
Licence
Copyright 2020-2022, the webview_deno team. All rights reserved. MIT license.
探索相关项目
加载中…