func (d *DOM) OnClick(o *js.Object, callback func()) {
	o.Call("addEventListener", "click", callback)
}
OnClick registers a callback to be invoked when the specified object is
clicked.
package dom
import (
	"log"
	"github.com/gopherjs/gopherjs/js"
)
var (
	Doc = js.Global.Get("document")
)
type DOM struct {
	doc *js.Object
}
func New(doc *js.Object) *DOM {
	return &DOM{doc: doc}
}
func (d *DOM) RemoveChildren(p *js.Object) {
	for p.Call("hasChildNodes").Bool() {
		p.Call("removeChild", p.Get("firstChild"))
	}
}
func (d *DOM) NewElement(tag string) *js.Object {
	return d.doc.Call("createElement", tag)
}
func (d *DOM) NewText(text string) *js.Object {
	return d.doc.Call("createTextNode", text)
}
func (d *DOM) DoClick(o *js.Object) {
	o.Call("click")
}