-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `accept_first_mouse` -> `acceptFirstMouse` * Add support for configuring webview size * Prepare 0.0.12 (binary 0.1.10) * Add ability to set window size after init * Return scale factor with sizing * Update changelog
- Loading branch information
Showing
13 changed files
with
746 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "deno-webview" | ||
version = "0.1.9" | ||
version = "0.1.10" | ||
edition = "2021" | ||
|
||
[profile.release] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { createWebView } from "../src/lib.ts"; | ||
|
||
using webview = await createWebView({ | ||
title: "Window Size", | ||
html: ` | ||
<h1>Window Sizes</h1> | ||
<div style="display: flex; gap: 10px;"> | ||
<button onclick="window.ipc.postMessage('maximize')">Maximize</button> | ||
<button onclick="window.ipc.postMessage('minimize')">Minimize</button> | ||
<button onclick="window.ipc.postMessage('fullscreen')">Fullscreen</button> | ||
</div> | ||
`, | ||
size: { | ||
height: 200, | ||
width: 800, | ||
}, | ||
ipc: true, | ||
}); | ||
|
||
webview.on("ipc", ({ message }) => { | ||
switch (message) { | ||
case "maximize": | ||
webview.maximize(); | ||
break; | ||
case "minimize": | ||
webview.minimize(); | ||
break; | ||
case "fullscreen": | ||
webview.fullscreen(); | ||
break; | ||
default: | ||
console.error("Unknown message", message); | ||
} | ||
}); | ||
|
||
await webview.waitUntilClosed(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.