Documentation
¶
Rendered for js/wasm
Index ¶
- Constants
- Variables
- func NewXHTTPRequest(_type string, _url string, _async bool) (js.Value, error)
- func ValidJSValue(_name string, _v js.Value) error
- type Attribute
- type Component
- type Element
- func (elem *Element) AddEventListener(_eventName string, _cb js.Func) error
- func (elem *Element) Emit(_name string, _data map[string]interface{}, _bub bool)
- func (elem *Element) GetAttribute(_name string) (js.Value, error)
- func (elem *Element) GetCacheValue(_name string) (interface{}, error)
- func (elem *Element) GetProperty(_names ...string) (js.Value, error)
- func (elem *Element) Parent() string
- func (elem *Element) Remove() error
- func (elem *Element) RemoveAttribute(_compName string) error
- func (elem *Element) RemoveChildById(_id string) error
- func (elem *Element) SetAttribute(_compName string, _vals map[string]interface{}) error
- func (elem *Element) SetAttributes(_comps []Component) error
- func (elem *Element) SetChild(_v js.Value) error
- func (elem *Element) SetClass(_cn string) error
- func (elem *Element) SetID(_id string) error
- func (elem *Element) SetProperty(_val interface{}, _names ...string) error
- func (elem *Element) StoreCacheValue(_name, _type string, _val interface{}) error
- func (elem *Element) String() string
- type Logger
- func (l *Logger) Debug(_msg string)
- func (l *Logger) Error(_err error)
- func (l *Logger) Info(_msg string)
- func (l *Logger) Log(_v ...interface{})
- func (l *Logger) LogElement(_e *Element)
- func (l *Logger) LogValue(_v js.Value)
- func (l *Logger) Print(_msg string)
- func (l *Logger) Write(p []byte) (int, error)
- type Window
- func (w *Window) ElementById(_id string) *Element
- func (w *Window) GetCookie(_name string) (string, error)
- func (w *Window) GetElementByTag(_tag string) (*Element, error)
- func (w *Window) GetGlobal(_name string) (js.Value, error)
- func (w *Window) GetValueById(_id string) (js.Value, error)
- func (w *Window) NewElementWithTag(_tag string) *Element
- func (w *Window) NewElementWithValue(_v js.Value) *Element
- func (w *Window) RemoveElementById(_id string)
- func (w *Window) SetCookie(_name, _val string) error
- func (w *Window) SetGlobal(_name string, _val interface{}) error
Constants ¶
View Source
const ( ELEMENT__tag = "tagName" ELEMENT__id = "id" ELEMENT__class = "className" ELEMENT__innerText = "innerText" FUNCTION__appendChild = "appendChild" PROPERTY__value = "value" FUNCTION__input_onfocus = "onfocus" )
View Source
const ( XHTTP__response = "response" XHTTP__error = "Error" PROMISE = "promise" PROMISE__then = "then" PROMISE__catch = "catch" )
View Source
const ( WINDOW__location = "location" FUNCTION__location_replace = "replace" FUNCTION__form_onsubmit = "onsubmit" FUNCTION__form_preventDefault = "preventDefault" )
Variables ¶
View Source
var ( GOWEB_ERROR_COMPONENT_VALS_NIL = errors.New("component vals map nil") GOWEB_ERROR_INVALID_ATTRIBUTE_TYPE = errors.New("invalid component attribute type") )
Functions ¶
func NewXHTTPRequest ¶
Types ¶
type Element ¶
func NewElement ¶
func (*Element) AddEventListener ¶
AddEventListener ...
func (*Element) GetAttribute ¶
GetAttribute ...
func (*Element) GetCacheValue ¶
NOT IMPLEMENTED
func (*Element) GetProperty ¶
GetProperty ...
func (*Element) RemoveAttribute ¶
RemoveAttribute ...
func (*Element) RemoveChildById ¶
RemoveChildByID ...
func (*Element) SetAttribute ¶
SetAttribute ...
func (*Element) SetAttributes ¶
SetAttributes ...
func (*Element) SetProperty ¶
SetProperty ...
func (*Element) StoreCacheValue ¶
StoreCacheValue - NOT IMPLEMENTED
type Logger ¶
type Logger struct { Prefix string // contains filtered or unexported fields }
func (*Logger) LogElement ¶
type Window ¶
type Window struct { Title string Version string *Logger // contains filtered or unexported fields }
func (*Window) GetElementByTag ¶
GetElementByTag returns the first element in the document with the given tag (e.g. <div>, <a-entity>, etc.)
func (*Window) GetValueById ¶
GetValueById ...
func (*Window) NewElementWithTag ¶
NewElementWithTag ...
func (*Window) NewElementWithValue ¶
NewElementWithValue ...
func (*Window) RemoveElementById ¶
RemoveElementById ...
Click to show internal directories.
Click to hide internal directories.