This version of the module is deprecated: This package is deprecated. moonbit-community/proton should be preferred.
MoonBit bindings for webview, a tiny library for creating web-based desktop GUIs.
import {
"justjavac/proton"
"justjavac/proton_ext/fs" @fs
"justjavac/proton_ext/path" @path
}
async fn main {
@proton.html("Demo", "<html></html>", width=900, height=700, debug=true)
.extension(@fs.extension())
.extension(@path.extension())
.run_or_abort()
}async fn main {
@proton.config("moon.proton")
.extension(@fs.extension())
.extension(@path.extension())
.run_or_abort()
}window = {
title: "Demo",
width: 960,
height: 720,
}
entry = {
kind: "file",
value: "app.html",
}
debug = trueawait window.__MoonBit__.fs.readFile("demo.txt");
await window.__MoonBit__.path.resolve({ path: "." });
window.__MoonBit__.events.on("fs.activity", console.log);await window.__MoonBit__.core.invokeOp("ext:path/resolve", { path: "." });proton cef setupmoon -C examples build --target nativemoon install --path cli --bin target\proton-tools
Copy-Item target\proton-tools\proton_cli.exe target\proton-tools\proton.exe -Forcemoon build src\cef_process --target native
moon -C examples run 43_cef_bind_smoke --target native
node .\scripts\e2e_cdp_smoke.mjstype Apptype ExtensionRegistryfn asset(title : String, path : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> Appfn create_app(manifest : AppManifest, registry : ExtensionRegistry, base_dir? : String?) -> Result[App, String]fn file(title : String, path : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> Appfn html(title : String, html : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> AppInstall
Download zipMoonBit bindings for webview, a tiny library for creating web-based desktop GUIs.