{"id":28470701,"url":"https://github.com/sunaipa5/go-webkit6","last_synced_at":"2026-05-18T13:31:42.857Z","repository":{"id":296704773,"uuid":"994206131","full_name":"sunaipa5/go-webkit6","owner":"sunaipa5","description":"WebkitGTK 6.0 bindings for go. Written with purego.","archived":false,"fork":false,"pushed_at":"2026-01-11T11:04:16.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T15:54:42.871Z","etag":null,"topics":["binding","go","golang","library","purego","webkitgtk","webkitgtk-6"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunaipa5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-01T12:59:30.000Z","updated_at":"2026-01-10T23:41:24.000Z","dependencies_parsed_at":"2025-06-01T22:16:08.054Z","dependency_job_id":"1c27331f-7b50-4af6-be47-6446fe6a63dd","html_url":"https://github.com/sunaipa5/go-webkit6","commit_stats":null,"previous_names":["sunaipa5/go-webkit6"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sunaipa5/go-webkit6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaipa5%2Fgo-webkit6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaipa5%2Fgo-webkit6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaipa5%2Fgo-webkit6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaipa5%2Fgo-webkit6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunaipa5","download_url":"https://codeload.github.com/sunaipa5/go-webkit6/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaipa5%2Fgo-webkit6/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33179426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binding","go","golang","library","purego","webkitgtk","webkitgtk-6"],"created_at":"2025-06-07T10:05:50.125Z","updated_at":"2026-05-18T13:31:42.845Z","avatar_url":"https://github.com/sunaipa5.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-webkit6\n\n[WebkitGTK](https://webkitgtk.org/) 6.0 bindings for go. Written with [purego](https://github.com/ebitengine/purego). Compatible with [jwijenbergh/puregotk](https://github.com/jwijenbergh/puregotk)\n\n## About features\n\nWebkitGTK is a very large library, so it is not possible for me to transfer all of its features. You can open feature request for the features you need.\n\nVisit the [functions.md](https://github.com/sunaipa5/go-webkit6/blob/main/functions.md) to see imported functions\n\n\u003e This library is not useful by itself, you need a GTK library.\n\n## Examples\n\n| Name                                                                       | Description                                           |\n| -------------------------------------------------------------------------- | ----------------------------------------------------- |\n| [simple](https://github.com/sunaipa5/go-webkit6/tree/main/examples/simple) | Basic usage                                           |\n| [bind](https://github.com/sunaipa5/go-webkit6/tree/main/examples/bind)     | Usage for WebKitGTK Script Message Handler (JS calls) |\n| [proxy](https://github.com/sunaipa5/go-webkit6/tree/main/examples/proxy)   | Proxy usage                                           |\n\n## Basic example with [jwijenbergh/puregotk](https://github.com/jwijenbergh/puregotk)\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n\t\"unsafe\"\n\n\t\"github.com/sunaipa5/go-webkit6/webkit\"\n\n\t\"github.com/jwijenbergh/puregotk/v4/adw\"\n\t\"github.com/jwijenbergh/puregotk/v4/gio\"\n\t\"github.com/jwijenbergh/puregotk/v4/glib\"\n\t\"github.com/jwijenbergh/puregotk/v4/gobject\"\n\t\"github.com/jwijenbergh/puregotk/v4/gobject/types\"\n\t\"github.com/jwijenbergh/puregotk/v4/gtk\"\n)\n\nfunc main() {\n\tadw.Init()\n\n\tapp := adw.NewApplication(\"com.test.app\", gio.GApplicationFlagsNoneValue)\n\tdefer app.Unref()\n\n\tactcb := func(_ gio.Application) {\n\t\tactivate(app)\n\t}\n\tapp.ConnectActivate(\u0026actcb)\n\n\tif code := app.Run(len(os.Args), os.Args); code \u003e 0 {\n\t\tos.Exit(code)\n\t}\n}\n\nfunc activate(app *adw.Application) {\n\twindow := adw.NewApplicationWindow(\u0026app.Application)\n\n\tmainBox := gtk.NewBox(gtk.OrientationVerticalValue, 0)\n\n\theaderBar := adw.NewHeaderBar()\n\theaderBar.AddCssClass(\"flat\")\n\theaderBar.AddCssClass(\"compact\")\n\theaderBar.SetShowTitle(false)\n\theaderBar.SetShowEndTitleButtons(true)\n\tmainBox.Append(\u0026headerBar.Widget)\n\n\twebViewWidget := init_webview()\n\n\twebViewWidget.SetVexpand(true)\n\twebViewWidget.SetHexpand(true)\n\twebViewWidget.Show()\n\n\tmainBox.Append(webViewWidget)\n\n\twindow.SetContent(\u0026mainBox.Widget)\n\twindow.SetDefaultSize(800, 600)\n\twindow.Present()\n\n}\n\nfunc init_webview() *gtk.Widget {\n\tuserHome, err := os.UserHomeDir()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tbaseDataDir := path.Join(userHome, \"webkit6-test\", \"data\")\n\tbaseCacheDir := path.Join(userHome, \"webkit6-test\", \"cache\")\n\n\t/*\n\t\tCreate a new network session with base data dir and base cache dir\n\t*/\n\tnetsession := webkit.NetworkSessionNew(baseDataDir, baseCacheDir)\n\n\t/*\n\t   Create a new GObject instance of type WebView.\n\t   Use `WebViewGetType` to obtain the type ID.\n\n\t   Assign the network session to the `network-session` property.\n\t   You do not need to convert the network session to a GObject manually,\n\t   as it is already a GObject-compatible pointer.\n\t*/\n\twebviewObj := gobject.NewObject(\n\t\tgobject.Type(webkit.WebViewGetType()),\n\t\t\"network-session\", netsession,\n\t)\n\n\twebview := webviewObj.Ptr\n\n\twebviewWidget := gtk.WidgetNewFromInternalPtr(webview)\n\n\twebkitsettings := webkit.WebViewGetSettings(webview)\n\twebkit.SettingsSetEnablePageCache(webkitsettings, true)\n\twebkit.SettingsSetEnableWebGL(webkitsettings, true)\n\twebkit.SettingsSetEnableSmoothScrolling(webkitsettings, true)\n\twebkit.SettingsSetEnableWebAudio(webkitsettings, true)\n\twebkit.SettingsSetJavascriptCanAccessClipboard(webkitsettings, false)\n\twebkit.SettingsSetHardwareAccelerationPolicy(webkitsettings, 0)\n\n\t//DEVTOOLS\n\twebkit.SettingsSetEnableDeveloperExtras(webkitsettings, true)\n\n\twebkit.WebViewLoadUri(webview, \"https://go.dev\")\n\n\t//Permission request handler\n\tpermissionFunc := func(webview, request, userData uintptr) {\n\t\tfmt.Println(\"Permission request\")\n\n\t\t//Handle notification request\n\t\tif gobject.TypeCheckInstanceIsA((*gobject.TypeInstance)(unsafe.Pointer(request)), types.GType(webkit.NotificationPermissionRequestGetType())) {\n\t\t\t//Allow permission the notification request.\n\t\t\t//After this, the notification will be shown.\n\t\t\twebkit.PermissionRequestAllow(request)\n\t\t}\n\t}\n\n\t//Create signal connection\n\tgobject.SignalConnect(webview, \"permission-request\", glib.NewCallback(\u0026permissionFunc))\n\n\treturn webviewWidget\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunaipa5%2Fgo-webkit6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunaipa5%2Fgo-webkit6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunaipa5%2Fgo-webkit6/lists"}