Web API package for use when compling Go to WASM
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

31 lines
815 B

// Code generated DO NOT EDIT
// htmlcollection.go
package dom
import "syscall/js"
type HTMLCollectionIFace interface {
Item(args ...interface{}) Element
GetLength() int
NamedItem(args ...interface{}) Element
}
type HTMLCollection struct {
Value
}
func JSValueToHTMLCollection(val js.Value) HTMLCollection {
return HTMLCollection{Value: Value{Value: val}}
}
func (v Value) AsHTMLCollection() HTMLCollection { return HTMLCollection{Value: v} }
func (h HTMLCollection) Item(args ...interface{}) Element {
val := h.Call("item", args...)
return JSValueToElement(val.JSValue())
}
func (h HTMLCollection) GetLength() int {
val := h.Get("length")
return val.Int()
}
func (h HTMLCollection) NamedItem(args ...interface{}) Element {
val := h.Call("namedItem", args...)
return JSValueToElement(val.JSValue())
}