Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2: add dom package #69

Merged
merged 3 commits into from
May 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
# js/dom

Package dom provides GopherJS bindings for the JavaScript DOM APIs.
Package dom provides Go bindings for the JavaScript DOM APIs.

## Install
## Version 2

**API Status:** Alpha, more API changes may be done soon

Version 2 of package dom is implemented on top of the [`syscall/js`](https://godoc.org/syscall/js) API and supports both Go WebAssembly and GopherJS.

It provides an API that is as close as possible to v1, with the following neccessary changes:

- All struct fields with `js:"foo"` tags have been replaced with equivalent methods
- `Underlying()` returns `js.Value` instead of `*js.Object`
- `AddEventListener()` returns `js.Func` instead of `func(*js.Object)`

### Install

go get honnef.co/go/js/dom/v2

### Documentation

For documentation, see https://godoc.org/honnef.co/go/js/dom/v2.

## Version 1

**API Status:** Stable, changes only due to DOM being a moving target

Version 1 of package dom is implemented on top of the [`github.com/gopherjs/gopherjs/js`](https://godoc.org/github.com/gopherjs/gopherjs/js) API and supports GopherJS only.

### Install

go get honnef.co/go/js/dom

## Documentation
### Documentation

For documentation, see http://godoc.org/honnef.co/go/js/dom
For documentation, see https://godoc.org/honnef.co/go/js/dom.
Loading