Skip to content

GopeedLab/webview_go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webview_go

GoDoc Go Report Card

Fork of webview/webview_go with extra features. Go language binding for the webview library.

What's New

  • Cookie Management — Full cross-platform cookie APIs (GetCookies, SetCookie, DeleteCookie, ClearCookies) with native implementations for macOS (WebKit), Linux (WebKitGTK), and Windows (WebView2).
  • SetUserAgent — Update the native user agent string used by the embedded browser engine.

Getting Started

See Go package documentation for the Go API documentation, or simply read the source code.

Start with creating a new directory structure for your project.

mkdir my-project && cd my-project

Create a new Go module.

go mod init example.com/app

Save one of the example programs into your project directory.

curl -sSLo main.go "https://raw.githubusercontent.com/GopeedLab/webview_go/master/examples/basic/main.go"

Install dependencies.

go get github.com/GopeedLab/webview_go

Build the example. On Windows, add -ldflags="-H windowsgui" to the command line.

go build

Notes

Calling Eval() or Dispatch() before Run() does not work because the webview instance has only been configured and not yet started.

Cookie APIs are available through GetCookies, SetCookie, DeleteCookie, and ClearCookies on darwin, linux, and windows. They should be called on the UI thread.

About

Go language bindings for the webview library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 83.9%
  • C++ 14.2%
  • Go 1.9%