webviewloader

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: MIT, ISC, MIT Imports: 13 Imported by: 0

README

Webviewloader

Webviewloader is a port of OpenWebView2Loader to Go.

It is intended to be feature-complete with the original WebView2Loader distributed with the WebView2 NuGet package, but some features are intentionally not implemented.

Status

  • CompareBrowserVersions
  • CreateCoreWebView2Environment
  • CreateCoreWebView2EnvironmentWithOptions
  • GetAvailableCoreWebView2BrowserVersionString

Not implemented features

  • Registry Overrides of Parameters
  • Env Variable Overrides of Parameters
  • Does not incorporate GetCurrentPackageInfo to search for an installed runtime

Documentation

Index

Constants

Variables

View Source
var WebView2Loader []byte

Functions

func CompareBrowserVersions

func CompareBrowserVersions(v1 string, v2 string) (int, error)

CompareBrowserVersions will compare the 2 given versions and return:

   Less than zero: v1 < v2
             zero: v1 == v2
Greater than zero: v1 > v2

func CreateCoreWebView2EnvironmentWithOptions

func CreateCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder *uint16, environmentOptions uintptr, environmentCompletedHandle uintptr) (uintptr, error)

CreateCoreWebView2EnvironmentWithOptions tries to load WebviewLoader2 and call the CreateCoreWebView2EnvironmentWithOptions routine.

func GetAvailableCoreWebView2BrowserVersionString

func GetAvailableCoreWebView2BrowserVersionString(path string) (string, error)

GetAvailableCoreWebView2BrowserVersionString returns version of the webview2 runtime. If path is empty, it will try to find installed webview2 is the system. If there is no version installed, a blank string is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL