Documentation ¶
Index ¶
- Variables
- func Alert(message string)
- func ArrayToSlice(arr js.Value) []interface{}
- func Delete(key string)
- func DeleteCookie(name string)
- func GetCookie(name string) string
- func InstanceOf(value, constructor js.Value) bool
- func IsMobile() bool
- func ObjectToMap(obj js.Value) map[string]interface{}
- func ObjectToMapT[T any](obj js.Value) map[string]T
- func RegisterFunc(name string, f JSExtFunc)
- func RemoveImport(name string)
- func Set(key string, value any)
- func SetCookie(name, value string, tim time.Duration) error
- func SetFavicon(url string) error
- func SliceToInterface(s []string) []interface{}
- func ToJSFunc(f JSExtFunc) js.Func
- func TypeOf(value, constructor js.Value) bool
- func UnpackArray[T Value | js.Value | Element | Style | Event](v js.Value) []T
- func WrapFunc(f func()) js.Func
- type Args
- type Element
- func (e Element) AddEventListener(event string, listener func(this Value, event Event)) Element
- func (e Element) After(elements ...Element)
- func (e Element) Animate(keyframes []interface{}, options map[string]interface{}) Value
- func (e Element) Append(elements ...Element)
- func (e Element) AppendChild(child Element) Element
- func (e Element) AppendChildren(children []Element) Element
- func (e Element) AppendTo(parent Element)
- func (e Element) AssignedSlot() Element
- func (e Element) Attributes() Value
- func (e Element) Before(elements ...Element)
- func (e Element) Call(m string, args ...interface{}) Value
- func (e Element) ChildElementCount() int
- func (e Element) Children() Value
- func (e Element) ClassList(c ...string) Value
- func (e Element) ClassName() string
- func (e Element) ClientHeight() int
- func (e Element) ClientLeft() int
- func (e Element) ClientTop() int
- func (e Element) ClientWidth() int
- func (e Element) Dataset() Value
- func (e Element) Delete(p string)
- func (e Element) Equal(other js.Value) bool
- func (e Element) FirstElementChild() Element
- func (e Element) Get(p string) Value
- func (e Element) GetChildNodes() Value
- func (e Element) GetChildren() Value
- func (e Element) GetClassList() Value
- func (e Element) GetElementById(id string) Element
- func (e Element) GetElementsByClassName(className string) Element
- func (e Element) GetElementsByTagName(tagName string) Element
- func (e Element) GetStyleProperty(name string) string
- func (e Element) Height() int
- func (e Element) Href() string
- func (e Element) ID() string
- func (e Element) InnerElement(el Element) Element
- func (e Element) InnerHTML(html string) Element
- func (e Element) InnerText(text string) Element
- func (e Element) InsertBefore(element, before Element)
- func (e Element) JSValue() js.Value
- func (e Element) MapDataset() map[string]string
- func (e Element) ParentElement() Element
- func (e Element) Prepend(elements ...Element)
- func (e Element) Remove()
- func (e Element) RemoveChild(child Element) Element
- func (e Element) RemoveChildren(children []Element) Element
- func (e Element) RemoveEventListener(event string, listener func(this Value, event Event)) Element
- func (e Element) ReplaceChild(element, before Element)
- func (e Element) ScrollHeight() int
- func (e Element) ScrollIntoView(center bool)
- func (e Element) ScrollIntoViewIfNeeded(center bool)
- func (e Element) ScrollLeft() int
- func (e Element) ScrollTo(x, y int)
- func (e Element) ScrollTop() int
- func (e Element) ScrollWidth() int
- func (e Element) Set(p string, v interface{}) Element
- func (e Element) SetAttribute(name, value string) Element
- func (e Element) SetClassName(className string) Element
- func (e Element) SetID(id string) Element
- func (e Element) Style() Style
- func (e Element) StyleProperty(name, value string) Element
- func (e Element) Value() Value
- func (e Element) Width() int
- type Elements
- type Event
- func (e Event) Bubbles() bool
- func (e Event) Call(m string, args ...interface{}) js.Value
- func (e Event) Cancelable() bool
- func (e Event) Composed() bool
- func (e Event) ComposedPath() []js.Value
- func (e Event) CurrentTarget() Value
- func (e Event) DefaultPrevented() bool
- func (e Event) Delete(p string)
- func (e Event) Equal(other js.Value) bool
- func (e Event) EventPhase() int
- func (e Event) Get(p string) js.Value
- func (e Event) InitEvent(eventType string, bubbles bool, cancelable bool)
- func (e Event) IsTrusted() bool
- func (e Event) JSValue() js.Value
- func (e Event) PreventDefault()
- func (e Event) Set(p string, x interface{})
- func (e Event) StopImmediatePropagation()
- func (e Event) StopPropagation()
- func (e Event) Target() Value
- func (e Event) TimeStamp() int
- func (e Event) Type() string
- func (e Event) Value() Value
- type Export
- func (e Export) Call(name string, args ...interface{}) Value
- func (e Export) Get(name string) Value
- func (e Export) JSExt() Value
- func (e Export) Register(name string)
- func (e Export) RegisterTo(name string, to Value)
- func (e Export) RegisterToExport(name string, to Export)
- func (e Export) Remove(name string)
- func (e Export) Set(name string, value interface{})
- func (e Export) SetFunc(name string, f func())
- func (e Export) SetFuncWithArgs(name string, f JSExtFunc)
- func (e Export) SetMultipleWithArgs(fns map[string]JSExtFunc)
- func (e Export) Value() js.Value
- type Import
- type JSExtEventFunc
- type JSExtFunc
- type JSFunc
- type Style
- func (s Style) AlignContent(str ...string) string
- func (s Style) AlignItems(str ...string) string
- func (s Style) AlignSelf(str ...string) string
- func (s Style) Animation(str ...string) string
- func (s Style) AnimationDelay(str ...string) string
- func (s Style) AnimationDirection(str ...string) string
- func (s Style) AnimationDuration(str ...string) string
- func (s Style) AnimationFillMode(str ...string) string
- func (s Style) AnimationIterationCount(str ...string) string
- func (s Style) AnimationName(str ...string) string
- func (s Style) AnimationPlayState(str ...string) string
- func (s Style) AnimationTimingFunction(str ...string) string
- func (s Style) BackfaceVisibility(str ...string) string
- func (s Style) Background(str ...string) string
- func (s Style) BackgroundAttachment(str ...string) string
- func (s Style) BackgroundClip(str ...string) string
- func (s Style) BackgroundColor(str ...string) string
- func (s Style) BackgroundImage(str ...string) string
- func (s Style) BackgroundOrigin(str ...string) string
- func (s Style) BackgroundPosition(str ...string) string
- func (s Style) BackgroundRepeat(str ...string) string
- func (s Style) BackgroundSize(str ...string) string
- func (s Style) Border(str ...string) string
- func (s Style) BorderBottom(str ...string) string
- func (s Style) BorderBottomColor(str ...string) string
- func (s Style) BorderBottomLeftRadius(str ...string) string
- func (s Style) BorderBottomRightRadius(str ...string) string
- func (s Style) BorderBottomStyle(str ...string) string
- func (s Style) BorderBottomWidth(str ...string) string
- func (s Style) BorderCollapse(str ...string) string
- func (s Style) BorderColor(str ...string) string
- func (s Style) BorderImage(str ...string) string
- func (s Style) BorderImageOutset(str ...string) string
- func (s Style) BorderImageRepeat(str ...string) string
- func (s Style) BorderImageSlice(str ...string) string
- func (s Style) BorderImageSource(str ...string) string
- func (s Style) BorderImageWidth(str ...string) string
- func (s Style) BorderLeft(str ...string) string
- func (s Style) BorderLeftColor(str ...string) string
- func (s Style) BorderLeftStyle(str ...string) string
- func (s Style) BorderLeftWidth(str ...string) string
- func (s Style) BorderRadius(str ...string) string
- func (s Style) BorderRight(str ...string) string
- func (s Style) BorderRightColor(str ...string) string
- func (s Style) BorderRightStyle(str ...string) string
- func (s Style) BorderRightWidth(str ...string) string
- func (s Style) BorderSpacing(str ...string) string
- func (s Style) BorderStyle(str ...string) string
- func (s Style) BorderTop(str ...string) string
- func (s Style) BorderTopColor(str ...string) string
- func (s Style) BorderTopLeftRadius(str ...string) string
- func (s Style) BorderTopRightRadius(str ...string) string
- func (s Style) BorderTopStyle(str ...string) string
- func (s Style) BorderTopWidth(str ...string) string
- func (s Style) BorderWidth(str ...string) string
- func (s Style) Bottom(str ...string) string
- func (s Style) BoxShadow(str ...string) string
- func (s Style) BoxSizing(str ...string) string
- func (s Style) CaptionSide(str ...string) string
- func (s Style) CaretColor(str ...string) string
- func (s Style) Clear(str ...string) string
- func (s Style) Clip(str ...string) string
- func (s Style) Color(str ...string) string
- func (s Style) ColumnCount(str ...string) string
- func (s Style) ColumnFill(str ...string) string
- func (s Style) ColumnGap(str ...string) string
- func (s Style) ColumnRule(str ...string) string
- func (s Style) ColumnRuleColor(str ...string) string
- func (s Style) ColumnRuleStyle(str ...string) string
- func (s Style) ColumnRuleWidth(str ...string) string
- func (s Style) ColumnSpan(str ...string) string
- func (s Style) ColumnWidth(str ...string) string
- func (s Style) Columns(str ...string) string
- func (s Style) CounterIncrement(str ...string) string
- func (s Style) CounterReset(str ...string) string
- func (s Style) CssFloat(str ...string) string
- func (s Style) Cursor(str ...string) string
- func (s Style) Direction(str ...string) string
- func (s Style) Display(str ...string) string
- func (s Style) EmptyCells(str ...string) string
- func (s Style) Filter(str ...string) string
- func (s Style) Flex(str ...string) string
- func (s Style) FlexBasis(str ...string) string
- func (s Style) FlexDirection(str ...string) string
- func (s Style) FlexFlow(str ...string) string
- func (s Style) FlexGrow(str ...string) string
- func (s Style) FlexShrink(str ...string) string
- func (s Style) FlexWrap(str ...string) string
- func (s Style) Font(str ...string) string
- func (s Style) FontFamily(str ...string) string
- func (s Style) FontSize(str ...string) string
- func (s Style) FontSizeAdjust(str ...string) string
- func (s Style) FontStyle(str ...string) string
- func (s Style) FontVariant(str ...string) string
- func (s Style) FontWeight(str ...string) string
- func (s Style) Get(key string) js.Value
- func (s Style) Height(str ...string) string
- func (s Style) Isolation(str ...string) string
- func (s Style) JSExt() Value
- func (s Style) JustifyContent(str ...string) string
- func (s Style) Left(str ...string) string
- func (s Style) LetterSpacing(str ...string) string
- func (s Style) LineHeight(str ...string) string
- func (s Style) ListStyle(str ...string) string
- func (s Style) ListStyleImage(str ...string) string
- func (s Style) ListStylePosition(str ...string) string
- func (s Style) ListStyleType(str ...string) string
- func (s Style) Margin(str ...string) string
- func (s Style) MarginBottom(str ...string) string
- func (s Style) MarginLeft(str ...string) string
- func (s Style) MarginRight(str ...string) string
- func (s Style) MarginTop(str ...string) string
- func (s Style) MaxHeight(str ...string) string
- func (s Style) MaxWidth(str ...string) string
- func (s Style) MinHeight(str ...string) string
- func (s Style) MinWidth(str ...string) string
- func (s Style) ObjectFit(str ...string) string
- func (s Style) ObjectPosition(str ...string) string
- func (s Style) Opacity(str ...string) string
- func (s Style) Order(str ...string) string
- func (s Style) Orphans(str ...string) string
- func (s Style) Outline(str ...string) string
- func (s Style) OutlineColor(str ...string) string
- func (s Style) OutlineOffset(str ...string) string
- func (s Style) OutlineStyle(str ...string) string
- func (s Style) OutlineWidth(str ...string) string
- func (s Style) Overflow(str ...string) string
- func (s Style) OverflowX(str ...string) string
- func (s Style) OverflowY(str ...string) string
- func (s Style) Padding(str ...string) string
- func (s Style) PaddingBottom(str ...string) string
- func (s Style) PaddingLeft(str ...string) string
- func (s Style) PaddingRight(str ...string) string
- func (s Style) PaddingTop(str ...string) string
- func (s Style) PageBreakAfter(str ...string) string
- func (s Style) PageBreakBefore(str ...string) string
- func (s Style) PageBreakInside(str ...string) string
- func (s Style) Perspective(str ...string) string
- func (s Style) PerspectiveOrigin(str ...string) string
- func (s Style) Position(str ...string) string
- func (s Style) Quotes(str ...string) string
- func (s Style) Resize(str ...string) string
- func (s Style) Right(str ...string) string
- func (s Style) ScrollBehavior(str ...string) string
- func (s Style) Set(key string, value interface{})
- func (s Style) TabSize(str ...string) string
- func (s Style) TableLayout(str ...string) string
- func (s Style) TextAlign(str ...string) string
- func (s Style) TextAlignLast(str ...string) string
- func (s Style) TextDecoration(str ...string) string
- func (s Style) TextDecorationColor(str ...string) string
- func (s Style) TextDecorationLine(str ...string) string
- func (s Style) TextDecorationStyle(str ...string) string
- func (s Style) TextIndent(str ...string) string
- func (s Style) TextOverflow(str ...string) string
- func (s Style) TextShadow(str ...string) string
- func (s Style) TextTransform(str ...string) string
- func (s Style) Top(str ...string) string
- func (s Style) Transform(str ...string) string
- func (s Style) TransformOrigin(str ...string) string
- func (s Style) TransformStyle(str ...string) string
- func (s Style) Transition(str ...string) string
- func (s Style) TransitionDelay(str ...string) string
- func (s Style) TransitionDuration(str ...string) string
- func (s Style) TransitionProperty(str ...string) string
- func (s Style) TransitionTimingFunction(str ...string) string
- func (s Style) UnicodeBidi(str ...string) string
- func (s Style) Unset(key string)
- func (s Style) UserSelect(str ...string) string
- func (s Style) Value() js.Value
- func (s Style) VerticalAlign(str ...string) string
- func (s Style) Visibility(str ...string) string
- func (s Style) WhiteSpace(str ...string) string
- func (s Style) Widows(str ...string) string
- func (s Style) Width(str ...string) string
- func (s Style) WordBreak(str ...string) string
- func (s Style) WordSpacing(str ...string) string
- func (s Style) WordWrap(str ...string) string
- func (s Style) ZIndex(str ...string) string
- type Value
- func BytesToArray(b []byte) Value
- func Call(key string, args ...any) Value
- func Eval(script string) Value
- func EventEmit(name string, args ...interface{}) Value
- func EventOn(name string, f func(args ...interface{})) Value
- func EventOnMultiple(f func(args ...interface{}), names ...string) []Value
- func Get(key string) Value
- func MapToObject(m map[string]interface{}) Value
- func New(key string, args ...any) Value
- func NewArray() Value
- func NewDate() Value
- func NewObject() Value
- func Null() Value
- func SetInterval(f JSExtFunc, timeout int) Value
- func SetTimeout(f JSExtFunc, timeout int) Value
- func SliceToArray(s []any) Value
- func Undefined() Value
- func ValueOf(value any) Value
- func (w Value) Add(s ...string)
- func (w Value) AppendChild(child Element)
- func (w Value) Bool() bool
- func (w Value) Call(m string, args ...any) Value
- func (w Value) Delete(p string)
- func (w Value) Equal(other js.Value) bool
- func (w Value) Float() float64
- func (w Value) Get(p string) Value
- func (w Value) GetElementByClassName(class string) Element
- func (w Value) GetElementById(id string) Element
- func (w Value) GetElementByTagName(tag string) Element
- func (w Value) Index(i int) Value
- func (w Value) InsertBefore(child Element, before Element)
- func (w Value) InstanceOf(t js.Value) bool
- func (w Value) Int() int
- func (w Value) Invalid() bool
- func (w Value) Invoke(args ...any) Value
- func (w Value) IsArray() bool
- func (w Value) IsBoolean() bool
- func (w Value) IsElement() bool
- func (w Value) IsFunction() bool
- func (w Value) IsNaN() bool
- func (w Value) IsNull() bool
- func (w Value) IsNumber() bool
- func (w Value) IsObject() bool
- func (w Value) IsString() bool
- func (w Value) IsUndefined() bool
- func (w Value) Length() int
- func (w Value) New(args ...any) Value
- func (w Value) PrependChild(child Element)
- func (w Value) QuerySelector(selector string) Element
- func (w Value) QuerySelectorAll(selector string) Elements
- func (w Value) Remove(a ...string)
- func (w Value) ReplaceChild(child Element, before Element)
- func (w Value) Set(p string, x any)
- func (w Value) SetIndex(i int, x any)
- func (w Value) String() string
- func (w Value) ToElement() Element
- func (w Value) Toggle(s string)
- func (w Value) ToggleCustom(s string) bool
- func (w Value) Truthy() bool
- func (w Value) Type() js.Type
- func (w Value) Value() js.Value
Constants ¶
This section is empty.
Variables ¶
var ( JSExt Export Global js.Value Document js.Value Window js.Value Body Element Head Element )
Default syscall/js values, some wrapped.
var Imported = make(map[string]Import)
Imports keeps track of all imported files.
Functions ¶
func ArrayToSlice ¶ added in v1.1.4
Convert a js.Value array to a []interface{}.
func InstanceOf ¶
Returns if something is an instance of something else.
func ObjectToMap ¶ added in v1.1.4
Convert a js.Value to a map[string]interface{}.
func ObjectToMapT ¶ added in v1.3.3
Convert a js.Value to a map[string]T.
func RegisterFunc ¶
Register a function to the global window.
func RemoveImport ¶
func RemoveImport(name string)
Remove an import from the DOM, and remove it from the Imported map.
func SliceToInterface ¶
func SliceToInterface(s []string) []interface{}
Convert a slice of strings to a slice of interfaces.
func UnpackArray ¶ added in v1.3.2
Unpack a js.value array to a slice.
Types ¶
type Element ¶
Element is a wrapper around js.Value.
func QuerySelector ¶
QuerySelector returns the first element that matches the specified selector.
func (Element) AddEventListener ¶
AddEventListener adds an event listener to the element.
func (Element) AppendChild ¶
AppendChild appends a child to the element.
func (Element) AppendChildren ¶
AppendChildren appends multiple children to the element.
func (Element) AssignedSlot ¶
Get the assigned slot of the element.
func (Element) ChildElementCount ¶
Get the childElementCount of the element.
func (Element) ClientHeight ¶
Get the clientHeight of the element.
func (Element) FirstElementChild ¶
Get the element's first child.
func (Element) GetChildNodes ¶
Get the children of the element.
func (Element) GetElementById ¶
Get an inner element by ID.
func (Element) GetElementsByClassName ¶
Get an inner element by class name.
func (Element) GetElementsByTagName ¶
Get an inner element by tag name.
func (Element) GetStyleProperty ¶
Get the style of an element property.
func (Element) InnerElement ¶
SetInnerElement clears the inner HTML and appends the element.
func (Element) InsertBefore ¶
Insert the element before the before element.
func (Element) MapDataset ¶ added in v1.1.5
Return the element's dataset as map
func (Element) RemoveChild ¶
RemoveChild removes a child from the element.
func (Element) RemoveChildren ¶
RemoveChildren removes multiple children from the element.
func (Element) RemoveEventListener ¶
RemoveEventListener removes an event listener from the element.
func (Element) ReplaceChild ¶
Replace the element with the before element.
func (Element) ScrollHeight ¶
Get the scroll height of the element.
func (Element) ScrollIntoView ¶
Scroll the element into view.
func (Element) ScrollIntoViewIfNeeded ¶
Scroll the element into view if needed.
func (Element) ScrollWidth ¶
Get the scroll width of the element.
func (Element) SetAttribute ¶
Remove removes the element from the DOM.
func (Element) SetClassName ¶
Set the className of the element.
func (Element) StyleProperty ¶
Set the style of an element property.
type Elements ¶
type Elements []Element
Defines multiple elements. This is a wrapper around a slice of []Element(js.Value).
func GetElementsByClassName ¶ added in v1.3.2
Get an element by class name.
func GetElementsByTagName ¶ added in v1.3.2
Get an element by tag name.
func QuerySelectorAll ¶
QuerySelectorAll returns all elements that match the specified selector.
func (Elements) AddEventListener ¶
AddEventListener adds an event listener to all elements in the slice.
type Event ¶
Wrapper for javascript events to make life easier.
func (Event) Cancelable ¶
Cancelable returns true if the event is cancelable.
func (Event) ComposedPath ¶
ComposedPath returns the composed path of the event.
func (Event) CurrentTarget ¶
CurrentTarget returns the current target of the event.
func (Event) DefaultPrevented ¶
DefaultPrevented returns true if the default action of the event has been prevented.
func (Event) EventPhase ¶
EventPhase returns the event phase of the event.
func (Event) PreventDefault ¶
func (e Event) PreventDefault()
PreventDefault prevents the default action of the event.
func (Event) StopImmediatePropagation ¶
func (e Event) StopImmediatePropagation()
StopImmediatePropagation stops the immediate propagation of the event.
func (Event) StopPropagation ¶
func (e Event) StopPropagation()
StopPropagation stops the propagation of the event.
type Export ¶
type Export Value
Export resembles an object bound to the DOM window. This object contains methods to be called from JS.
See js.go.init() for the initialization of this variable onto the global export object.
func (Export) RegisterTo ¶
RegisterTo registers the export to another jsext.Value.
func (Export) RegisterToExport ¶
RegisterToExport registers the export to another export.
func (Export) SetFuncWithArgs ¶
SetMultiple sets multiple functions on the export's js.Value.
func (Export) SetMultipleWithArgs ¶
SetMultiple sets multiple functions on the export's js.Value.
type Import ¶
type Import struct {
// contains filtered or unexported fields
}
Import is a file that has been imported into the DOM.
func ScriptBlock ¶
Import a script block for use with raw sourcecode.
func StyleBlock ¶
Import a style block for use with raw sourcecode.
type JSExtEventFunc ¶
type JSExtFunc ¶
func (JSExtFunc) FromJSFunc ¶
Convert from javascript function.
type Style ¶ added in v1.1.5
func (Style) AlignContent ¶ added in v1.1.5
func (Style) AlignItems ¶ added in v1.1.5
func (Style) AnimationDelay ¶ added in v1.1.5
func (Style) AnimationDirection ¶ added in v1.1.5
func (Style) AnimationDuration ¶ added in v1.1.5
func (Style) AnimationFillMode ¶ added in v1.1.5
func (Style) AnimationIterationCount ¶ added in v1.1.5
func (Style) AnimationName ¶ added in v1.1.5
func (Style) AnimationPlayState ¶ added in v1.1.5
func (Style) AnimationTimingFunction ¶ added in v1.1.5
func (Style) BackfaceVisibility ¶ added in v1.1.5
func (Style) Background ¶ added in v1.1.5
func (Style) BackgroundAttachment ¶ added in v1.1.5
func (Style) BackgroundClip ¶ added in v1.1.5
func (Style) BackgroundColor ¶ added in v1.1.5
func (Style) BackgroundImage ¶ added in v1.1.5
func (Style) BackgroundOrigin ¶ added in v1.1.5
func (Style) BackgroundPosition ¶ added in v1.1.5
func (Style) BackgroundRepeat ¶ added in v1.1.5
func (Style) BackgroundSize ¶ added in v1.1.5
func (Style) BorderBottom ¶ added in v1.1.5
func (Style) BorderBottomColor ¶ added in v1.1.5
func (Style) BorderBottomLeftRadius ¶ added in v1.1.5
func (Style) BorderBottomRightRadius ¶ added in v1.1.5
func (Style) BorderBottomStyle ¶ added in v1.1.5
func (Style) BorderBottomWidth ¶ added in v1.1.5
func (Style) BorderCollapse ¶ added in v1.1.5
func (Style) BorderColor ¶ added in v1.1.5
func (Style) BorderImage ¶ added in v1.1.5
func (Style) BorderImageOutset ¶ added in v1.1.5
func (Style) BorderImageRepeat ¶ added in v1.1.5
func (Style) BorderImageSlice ¶ added in v1.1.5
func (Style) BorderImageSource ¶ added in v1.1.5
func (Style) BorderImageWidth ¶ added in v1.1.5
func (Style) BorderLeft ¶ added in v1.1.5
func (Style) BorderLeftColor ¶ added in v1.1.5
func (Style) BorderLeftStyle ¶ added in v1.1.5
func (Style) BorderLeftWidth ¶ added in v1.1.5
func (Style) BorderRadius ¶ added in v1.1.5
func (Style) BorderRight ¶ added in v1.1.5
func (Style) BorderRightColor ¶ added in v1.1.5
func (Style) BorderRightStyle ¶ added in v1.1.5
func (Style) BorderRightWidth ¶ added in v1.1.5
func (Style) BorderSpacing ¶ added in v1.1.5
func (Style) BorderStyle ¶ added in v1.1.5
func (Style) BorderTopColor ¶ added in v1.1.5
func (Style) BorderTopLeftRadius ¶ added in v1.1.5
func (Style) BorderTopRightRadius ¶ added in v1.1.5
func (Style) BorderTopStyle ¶ added in v1.1.5
func (Style) BorderTopWidth ¶ added in v1.1.5
func (Style) BorderWidth ¶ added in v1.1.5
func (Style) CaptionSide ¶ added in v1.1.5
func (Style) CaretColor ¶ added in v1.1.5
func (Style) ColumnCount ¶ added in v1.1.5
func (Style) ColumnFill ¶ added in v1.1.5
func (Style) ColumnRule ¶ added in v1.1.5
func (Style) ColumnRuleColor ¶ added in v1.1.5
func (Style) ColumnRuleStyle ¶ added in v1.1.5
func (Style) ColumnRuleWidth ¶ added in v1.1.5
func (Style) ColumnSpan ¶ added in v1.1.5
func (Style) ColumnWidth ¶ added in v1.1.5
func (Style) CounterIncrement ¶ added in v1.1.5
func (Style) CounterReset ¶ added in v1.1.5
func (Style) EmptyCells ¶ added in v1.1.5
func (Style) FlexDirection ¶ added in v1.1.5
func (Style) FlexShrink ¶ added in v1.1.5
func (Style) FontFamily ¶ added in v1.1.5
func (Style) FontSizeAdjust ¶ added in v1.1.5
func (Style) FontVariant ¶ added in v1.1.5
func (Style) FontWeight ¶ added in v1.1.5
func (Style) JustifyContent ¶ added in v1.1.5
func (Style) LetterSpacing ¶ added in v1.1.5
func (Style) LineHeight ¶ added in v1.1.5
func (Style) ListStyleImage ¶ added in v1.1.5
func (Style) ListStylePosition ¶ added in v1.1.5
func (Style) ListStyleType ¶ added in v1.1.5
func (Style) MarginBottom ¶ added in v1.1.5
func (Style) MarginLeft ¶ added in v1.1.5
func (Style) MarginRight ¶ added in v1.1.5
func (Style) ObjectPosition ¶ added in v1.1.5
func (Style) OutlineColor ¶ added in v1.1.5
func (Style) OutlineOffset ¶ added in v1.1.5
func (Style) OutlineStyle ¶ added in v1.1.5
func (Style) OutlineWidth ¶ added in v1.1.5
func (Style) PaddingBottom ¶ added in v1.1.5
func (Style) PaddingLeft ¶ added in v1.1.5
func (Style) PaddingRight ¶ added in v1.1.5
func (Style) PaddingTop ¶ added in v1.1.5
func (Style) PageBreakAfter ¶ added in v1.1.5
func (Style) PageBreakBefore ¶ added in v1.1.5
func (Style) PageBreakInside ¶ added in v1.1.5
func (Style) Perspective ¶ added in v1.1.5
func (Style) PerspectiveOrigin ¶ added in v1.1.5
func (Style) ScrollBehavior ¶ added in v1.1.5
func (Style) TableLayout ¶ added in v1.1.5
func (Style) TextAlignLast ¶ added in v1.1.5
func (Style) TextDecoration ¶ added in v1.1.5
func (Style) TextDecorationColor ¶ added in v1.1.5
func (Style) TextDecorationLine ¶ added in v1.1.5
func (Style) TextDecorationStyle ¶ added in v1.1.5
func (Style) TextIndent ¶ added in v1.1.5
func (Style) TextOverflow ¶ added in v1.1.5
func (Style) TextShadow ¶ added in v1.1.5
func (Style) TextTransform ¶ added in v1.1.5
func (Style) TransformOrigin ¶ added in v1.1.5
func (Style) TransformStyle ¶ added in v1.1.5
func (Style) Transition ¶ added in v1.1.5
func (Style) TransitionDelay ¶ added in v1.1.5
func (Style) TransitionDuration ¶ added in v1.1.5
func (Style) TransitionProperty ¶ added in v1.1.5
func (Style) TransitionTimingFunction ¶ added in v1.1.5
func (Style) UnicodeBidi ¶ added in v1.1.5
func (Style) UserSelect ¶ added in v1.1.5
func (Style) VerticalAlign ¶ added in v1.1.5
func (Style) Visibility ¶ added in v1.1.5
func (Style) WhiteSpace ¶ added in v1.1.5
func (Style) WordSpacing ¶ added in v1.1.5
type Value ¶
Wrapper for javascript values to make life easier.
func BytesToArray ¶ added in v1.1.5
Convert a byte slice to a js.Value array.
func EventOnMultiple ¶ added in v1.1.4
Listen for multiple events on the global Runtime object.
func MapToObject ¶ added in v1.1.5
Convert a map to a js.Value object.
func SliceToArray ¶ added in v1.1.5
Convert a slice to a js.Value array.
func (Value) AppendChild ¶
AppendChild inserts a node after another node.
func (Value) Bool ¶
/////////////////////////////////////////////////////////
js.Value methods.
/////////////////////////////////////////////////////////
func (Value) GetElementByClassName ¶
GetElementByClassName returns the first element with the given class name.
func (Value) GetElementById ¶
GetElementById returns the first element with the given id.
func (Value) GetElementByTagName ¶
GetElementByTagName returns the first element with the given tag name.
func (Value) InsertBefore ¶
InsertBefore inserts a node before another node.
func (Value) IsFunction ¶
Returns true if the value is a javascript function.
func (Value) IsUndefined ¶
func (Value) PrependChild ¶
PrependChild inserts a node before another node.
func (Value) QuerySelector ¶
Query select inside of the value.
func (Value) QuerySelectorAll ¶
Query select all inside of the value.
func (Value) Remove ¶
Remove an attribute from an element, or the entire element if no attribute is given.
func (Value) ReplaceChild ¶
ReplaceChild replaces the child with the before element.
func (Value) ToggleCustom ¶
Great for values which cannot be addressed with .toggle()
- Returns the new value