Registry / web-framework / go-js-dom

go-js-dom

JSON →
library0.0.0-20250304181735-b5e52f05e89dgogounverified

Package dom provides GopherJS bindings for the JavaScript DOM APIs, enabling DOM manipulation from Go code compiled to JavaScript.

go get honnef.co/go/js/dom
INSTALL
IMPORT
SIG · GO-JS-DOM
G
go-js-dom
web-frameworkgov0.0.0-20250304181735-b5e52f05e89d
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dom
honnef.co/go/js/dom

Gets the window document and sets text content of an element by ID.

package main import ( "honnef.co/go/js/dom" ) func main() { d := dom.GetWindow().Document() d.GetElementByID("myElement").SetTextContent("Hello from Go!") }
Debug
Known issues
breakingThis package is designed for GopherJS and will not compile with standard Go compilers.
fix
Use 'gopherjs build' instead of 'go build'.
affects: all
Upgrade
Version history
0.0.0-20250304181735-b5e52f05e89dlatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
go-js-dom — go get go-js-dom · libregistry