//QuerySelector equivaltent to javascripts querySelector func (document Document) QuerySelector(selector css.Selector) Element { object := document.object.Call("querySelector", selector.Selector()) return Element{object: object} }
func addClick(selector css.Selector, handler func(dom.Event)) { document := dom.GetWindow().Document() document.QuerySelector(selector.Selector()).AddEventListener("click", true, handler) }
func getValue(selector css.Selector) string { return dom.GetWindow().Document().QuerySelector(selector.Selector()).Underlying().Get("value").String() }
func setValue(selector css.Selector, value string) { dom.GetWindow().Document().QuerySelector(selector.Selector()).Underlying().Set("value", value) }
//JQuery allows calling JQuery functions on given css.Selector func (document *Document) JQuery(selector css.Selector) (element jQuerySelector) { element.selector = selector.Selector() element.document = document return }