desktop_webview_window library

Classes

CreateConfiguration
JavaScriptMessage
A message from window.desktopWebview.postMessage(name, data) in the top-level document.
TitleBarOptions
What the default composer shows in the window's title bar, next to the system window buttons. An application composer receives the same choices in DWWComposeRequest::title_bar and may ignore them.
Webview
A browser window. Operations complete when native code has applied them and fail with a PlatformException when it reports an error. Operations a platform does not support throw UnsupportedError.
WebviewCookie
WebviewLoadError
A failed top-level navigation. Failures of subresources and iframes are not reported, nor are HTTP error responses, which load the server's page.
WebviewNavigationState
Current browser navigation state, the same state native composers receive.
WebviewWindow
WindowsWebviewOptions
Options that only WebView2 on Windows honours.

Enums

WebviewLoadErrorKind
Why a top-level page could not be loaded.

Typedefs

JavaScriptMessageHandler = void Function(Object? data, String origin)
Receives window.desktopWebview.postMessage(name, data) from the top-level document. data is the JSON-decoded value.
JavaScriptMessageListener = void Function(JavaScriptMessage message)
Receives a JavaScriptMessage. See Webview.addJavaScriptMessageHandler.
OnUrlRequestCallback = bool Function(String url)
Decides whether the browser may navigate to url. Return false to cancel. The navigation waits for the callback, so it must answer synchronously; a callback that throws allows the navigation. Schemes the WebView cannot load, such as mixin:, reach the callback too; handle them and return false.
PromptHandler = String Function(String prompt, String defaultText)