4 ms·
Go-webkit2: WebKit bindings for Go (w/headless support & JavaScript evaluation)
- sqs 13y agoI built go-webkit2 to make it easy to run a headless WebKit on a Web server to serve static HTML pages (generated from an AngularJS app) to search engines and other clients without JavaScript support. Right now it supports the most common operations and works well for headless browsing and GTK+ widget embedding. I will be implementing the rest of the WebKitGTK+ v2 API in the coming weeks. go-webkit2 also hooks into https://github.com/crazy2be/gojs https://github.com/crazy2be/gojs to enable execution of JavaScript in the context of the browser window. The README at https://sourcegraph.com/github.com/sourcegraph/go-webkit2/readme https://sourcegraph.com/github.com/sourcegraph/go-webkit2/re... has an example of this. I have a full project demonstrating the usage of go-webkit2 to run a headless browser and expose operations in a more friendly, Go-idiomatic API: https://sourcegraph.com/github.com/sourcegraph/webloop/readme https://sourcegraph.com/github.com/sourcegraph/webloop/readm.... It's called WebLoop and is like PhantomJS for Go. It's not ready for release, but if you are playing around with go-webkit2, it might be helpful. Thanks to https://github.com/crazy2be https://github.com/crazy2be for CRing my gojs patches and the Conformal folks for making https://github.com/conformal/gotk3 https://github.com/conformal/gotk3.