Rust webview for Node.js.
npm i webview-rs
const { createWindow } = require("webview-rs");
const html = `
<!DOCTYPE html>
<html>
<head>
<style>
body {
text-align: center;
}
</style>
</head>
<body>
<h1>Webview RS for Node.js</h1>
<button onclick="sayhi()">Say hi</button>
<script>
function sayhi() {
alert("hi from webview rs");
}
</script>
</body>
</html>
`;
createWindow({
title: "Webview rs",
width: 400,
height: 600,
content: html,
});
- Support parsing a URL to present content(PR welcome)
- macOS 12.1 with intel i5
- Any Windows
PRs welcome!
MIT © 2nthony