js

package
v0.0.0-...-cf9a1e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

View Source
var (
	ValueOf = js.ValueOf
	FuncOf  = js.FuncOf
)

Functions

func Append

func Append(x interface{})

func IsJSFunc

func IsJSFunc(v Wrapper) bool

func IsJSObject

func IsJSObject(v Wrapper) bool

Types

type Element

type Element struct {
	*EventTarget
}

func Create

func Create(tag string) *Element

func ElementOf

func ElementOf(v Value) *Element

func From

func From(tmpl HTML) *Element

func Query

func Query(selector string) *Element

func (*Element) Add

func (el *Element) Add(names ...string) *Element

func (*Element) AddAttrs

func (el *Element) AddAttrs(attrs map[string]string) *Element

func (*Element) Append

func (el *Element) Append(child interface{}) *Element

func (*Element) Attr

func (el *Element) Attr(a string) string

func (*Element) Call

func (el *Element) Call(m string, args ...interface{}) Value

func (*Element) Contains

func (el *Element) Contains(name string) bool

func (*Element) Disable

func (el *Element) Disable()

func (*Element) Disabled

func (el *Element) Disabled() bool

func (*Element) Enable

func (el *Element) Enable()

func (*Element) HTML

func (el *Element) HTML() HTML

func (*Element) HasAttr

func (el *Element) HasAttr(a string) bool

func (*Element) Hidden

func (el *Element) Hidden() bool

func (*Element) Hide

func (el *Element) Hide()

func (*Element) ID

func (el *Element) ID() string

func (*Element) OK

func (el *Element) OK() bool

func (*Element) Prepend

func (el *Element) Prepend(child interface{}) *Element

func (*Element) Prop

func (el *Element) Prop(p string) Value

func (*Element) Query

func (el *Element) Query(selectors string) *Element

func (*Element) QueryAll

func (el *Element) QueryAll(selectors string) Elements

func (*Element) Release

func (el *Element) Release()

func (*Element) Remove

func (el *Element) Remove(names ...string) *Element

func (*Element) RemoveAttr

func (el *Element) RemoveAttr(a string) *Element

func (*Element) RemoveStyle

func (el *Element) RemoveStyle(p string) *Element

func (*Element) Replace

func (el *Element) Replace(oldName, newName string) *Element

func (*Element) SetAttr

func (el *Element) SetAttr(a, v string) *Element

func (*Element) SetHTML

func (el *Element) SetHTML(h HTML) *Element

func (*Element) SetID

func (el *Element) SetID(id string)

func (*Element) SetProp

func (el *Element) SetProp(p string, x interface{}) *Element

func (*Element) SetStyle

func (el *Element) SetStyle(p, v string) *Element

func (*Element) SetText

func (el *Element) SetText(t string) *Element

func (*Element) Show

func (el *Element) Show()

func (*Element) Style

func (el *Element) Style(p string) string

func (*Element) TagName

func (el *Element) TagName() string

func (*Element) Text

func (el *Element) Text() string

func (*Element) Toggle

func (el *Element) Toggle(name string) *Element

type Elements

type Elements []*Element

func (Elements) Foreach

func (els Elements) Foreach(fn func(int, *Element))

type Event

type Event struct {
	// contains filtered or unexported fields
}

func EventOf

func EventOf(v Value) *Event

func (*Event) JSValue

func (e *Event) JSValue() Value

func (*Event) Target

func (e *Event) Target() TEventTarget

func (*Event) Type

func (e *Event) Type() string

type EventTarget

type EventTarget struct {
	// contains filtered or unexported fields
}

func EventTargetOf

func EventTargetOf(v Value) *EventTarget

func (*EventTarget) JSValue

func (t *EventTarget) JSValue() Value

func (*EventTarget) On

func (t *EventTarget) On(event string, fn Func)

func (*EventTarget) Release

func (t *EventTarget) Release()

type Func

type Func = js.Func

type HTML

type HTML string

func (HTML) Element

func (h HTML) Element() *Element

func (HTML) JSValue

func (h HTML) JSValue() Value

func (HTML) String

func (h HTML) String() string

type TEvent

type TEvent interface {
	Wrapper

	Type() string
	Target() TEventTarget
}

type TEventTarget

type TEventTarget interface {
	Wrapper

	On(event string, fn Func)

	Release()
}

type Type

type Type = js.Type

type Value

type Value = js.Value

func Global

func Global() Value

type Wrapper

type Wrapper = js.Wrapper

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL