- Add
webview.loadUrl
to load a new URL after the webview is initialized - Add the ability to specify headers when instantiating a webview with a URL
- Add
userAgent
toWebViewOptions
to construct a new webview with a custom user agent.
- Add
initializationScript
toWebViewOptions
. Allows providing JS that runs beforeonLoad
.
- Pages loaded with
html
are now considered to be in a secure context. - When creating a webview with
html
or callingwebview.loadHtml()
the webview now has a default origin which can be changed via theorigin
parameter - Improved type generation to output more doc strings and documented more code
- Update TLDraw example with a persistence key
- fix an issue where arm64 macs weren't downloading the correct binary
- added
webview.loadHtml(...)
BREAKING CHANGES
WebViewOptions
accept_first_mouse
is nowacceptFirstMouse
WebViewOptions
fullscreen
was removed in favor ofsize
Additions
- The webview size can be altered by providing
WebViewOptions
size
as either"maximized"
,"fullscreen"
, or{ width: number, height: number }
- added
webview.maximize()
- added
webview.minimize()
- added
webview.fullscreen()
- added
webview.getSize()
- added
webview.setSize({ ... })
Fixes
webview.on
andwebivew.once
had their types improved to actually return the result of their event payload
Misc
- Tao updated to v0.30.2
- Wry upgraded to v0.45.0
- Adds more doc comments
- Adds an
ipc
flag to enable sending messages from the webview back to the host deno process. - Adds an IPC example
- Updates notifications to pass message bodies through
- Adds a
getVersion
method toWebview
that returns the binary version. - Adds a check on startup that compares the expected version to the current version.
- Adds slightly more graceful error handling to deserialization errors in the deno code.
NOTE: The binary version was bumped this release, but it doesn't actually have changes. This is just me forcing a new release to be published.
- Fixed the release URL to ensure the download comes from the correct place
- Added this changelog
- Add the ability to show and hide the webview window via
.setVisibility(true/false)
- Added the ability to check if the webview window is visible via
.isVisible()
- Fixed a bug where
.on
and.once
weren't firing for the webview's lifecycle events
- Improved type generation to avoid publishing slow types to JSR
- Added examples, doc comments to code