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
876 B

// DO NOT EDIT - generated file
package dom
import "syscall/js"
type CustomElementRegistry struct {
Value
}
func NewCustomElementRegistry(v js.Value) *CustomElementRegistry {
val := Value{Value: v}
if val.IsNull() || val.IsUndefined() {
return nil
}
return val.ToCustomElementRegistry()
}
func (v Value) ToCustomElementRegistry() *CustomElementRegistry {
return &CustomElementRegistry{Value: v}
}
func (c *CustomElementRegistry) Define(name string, constructor interface{}) Value {
val := Value{Value: c.Call("define", ToJSValue(name), ToJSValue(constructor))}
return val
}
func (c *CustomElementRegistry) Get(name string) Value {
val := Value{Value: c.Call("get", ToJSValue(name))}
return val
}
func (c *CustomElementRegistry) WhenDefined(name string) *Promise {
val := Value{Value: c.Call("whenDefined", ToJSValue(name))}
return NewPromise(val.JSValue())
}