Documentation ¶
Index ¶
- Variables
- func A(attributes ...ElementAttribute) func(...Element) Element
- func ABBR(attributes ...ElementAttribute) func(...Element) Element
- func Address(attributes ...ElementAttribute) func(...Element) Element
- func Area(attributes ...ElementAttribute) func(...Element) Element
- func B(attributes ...ElementAttribute) func(...Element) Element
- func BR(attributes ...ElementAttribute) func(...Element) Element
- func Body(attributes ...ElementAttribute) func(...Element) Element
- func Button(attributes ...ElementAttribute) func(...Element) Element
- func Code(attributes ...ElementAttribute) func(...Element) Element
- func Col(attributes ...ElementAttribute) func(...Element) Element
- func Div(attributes ...ElementAttribute) func(...Element) Element
- func Footer(attributes ...ElementAttribute) func(...Element) Element
- func Group(attributes ...ElementAttribute) func(...Element) Element
- func H1(attributes ...ElementAttribute) func(...Element) Element
- func H2(attributes ...ElementAttribute) func(...Element) Element
- func H3(attributes ...ElementAttribute) func(...Element) Element
- func H4(attributes ...ElementAttribute) func(...Element) Element
- func H5(attributes ...ElementAttribute) func(...Element) Element
- func H6(attributes ...ElementAttribute) func(...Element) Element
- func Head(attributes ...ElementAttribute) func(...Element) Element
- func Header(attributes ...ElementAttribute) func(...Element) Element
- func IFrame(attributes ...ElementAttribute) func(...Element) Element
- func Image(attributes ...ElementAttribute) func(...Element) Element
- func Input(attributes ...ElementAttribute) func(...Element) Element
- func LI(attributes ...ElementAttribute) func(...Element) Element
- func P(attributes ...ElementAttribute) func(...Element) Element
- func Pre(attributes ...ElementAttribute) func(...Element) Element
- func Section(attributes ...ElementAttribute) func(...Element) Element
- func Span(attributes ...ElementAttribute) func(...Element) Element
- func TD(attributes ...ElementAttribute) func(...Element) Element
- func THead(attributes ...ElementAttribute) func(...Element) Element
- func TR(attributes ...ElementAttribute) func(...Element) Element
- func Table(attributes ...ElementAttribute) func(...Element) Element
- func Title(attributes ...ElementAttribute) func(...Element) Element
- func UL(attributes ...ElementAttribute) func(...Element) Element
- type Attribute
- type BackgroundColorAttribute
- type BorderRadiusAttribute
- type ClassAttribute
- type ColorAttribute
- type DisabledAttribute
- type DisplayAttribute
- type Element
- func (e Element) AddEventListener(eventType EventType, f func(js.Value, []js.Value)) Element
- func (e Element) AppendChild(child Element) Element
- func (e Element) AppendChildren(children ...Element) Element
- func (e Element) RemoveChild(child Element) Element
- func (e Element) RemoveChildren(children ...Element) Element
- func (e Element) ReplaceChild(old, new Element) Element
- func (e Element) Replaced(new Element) Element
- func (e Element) ReplacedWithEmpty() Element
- type ElementAttribute
- type ElementType
- type EventType
- type FlexDirectionAttribute
- type HREFAttribute
- type HeightAttribute
- type MarginAttribute
- type PaddingAttribute
- type PlaceholderAttribute
- type PositionAttribute
- type StyleAttribute
- type TitleAttribute
- type TypeAttribute
- type ValueAttribute
- type WidthAttribute
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Document = valueAsElement(js.Global().Get("document")) DocumentBody = valueAsElement(Document.Get("body")) )
Functions ¶
func A ¶
func A(attributes ...ElementAttribute) func(...Element) Element
func ABBR ¶
func ABBR(attributes ...ElementAttribute) func(...Element) Element
func Address ¶
func Address(attributes ...ElementAttribute) func(...Element) Element
func Area ¶
func Area(attributes ...ElementAttribute) func(...Element) Element
func B ¶
func B(attributes ...ElementAttribute) func(...Element) Element
func BR ¶
func BR(attributes ...ElementAttribute) func(...Element) Element
func Body ¶
func Body(attributes ...ElementAttribute) func(...Element) Element
func Button ¶
func Button(attributes ...ElementAttribute) func(...Element) Element
func Code ¶
func Code(attributes ...ElementAttribute) func(...Element) Element
func Col ¶
func Col(attributes ...ElementAttribute) func(...Element) Element
func Div ¶
func Div(attributes ...ElementAttribute) func(...Element) Element
func Footer ¶
func Footer(attributes ...ElementAttribute) func(...Element) Element
func Group ¶
func Group(attributes ...ElementAttribute) func(...Element) Element
func H1 ¶
func H1(attributes ...ElementAttribute) func(...Element) Element
func H2 ¶
func H2(attributes ...ElementAttribute) func(...Element) Element
func H3 ¶
func H3(attributes ...ElementAttribute) func(...Element) Element
func H4 ¶
func H4(attributes ...ElementAttribute) func(...Element) Element
func H5 ¶
func H5(attributes ...ElementAttribute) func(...Element) Element
func H6 ¶
func H6(attributes ...ElementAttribute) func(...Element) Element
func Head ¶
func Head(attributes ...ElementAttribute) func(...Element) Element
func Header ¶
func Header(attributes ...ElementAttribute) func(...Element) Element
func IFrame ¶
func IFrame(attributes ...ElementAttribute) func(...Element) Element
func Image ¶
func Image(attributes ...ElementAttribute) func(...Element) Element
func Input ¶
func Input(attributes ...ElementAttribute) func(...Element) Element
func LI ¶
func LI(attributes ...ElementAttribute) func(...Element) Element
func P ¶
func P(attributes ...ElementAttribute) func(...Element) Element
func Pre ¶
func Pre(attributes ...ElementAttribute) func(...Element) Element
func Section ¶
func Section(attributes ...ElementAttribute) func(...Element) Element
func Span ¶
func Span(attributes ...ElementAttribute) func(...Element) Element
func TD ¶
func TD(attributes ...ElementAttribute) func(...Element) Element
func THead ¶
func THead(attributes ...ElementAttribute) func(...Element) Element
func TR ¶
func TR(attributes ...ElementAttribute) func(...Element) Element
func Table ¶
func Table(attributes ...ElementAttribute) func(...Element) Element
func Title ¶
func Title(attributes ...ElementAttribute) func(...Element) Element
func UL ¶
func UL(attributes ...ElementAttribute) func(...Element) Element
Types ¶
type BackgroundColorAttribute ¶
type BackgroundColorAttribute string
func (BackgroundColorAttribute) Apply ¶
func (b BackgroundColorAttribute) Apply(e *Element)
type BorderRadiusAttribute ¶
type BorderRadiusAttribute string
func (BorderRadiusAttribute) Apply ¶
func (b BorderRadiusAttribute) Apply(e *Element)
type ClassAttribute ¶
type ClassAttribute string
func (ClassAttribute) Apply ¶
func (c ClassAttribute) Apply(e *Element)
type ColorAttribute ¶
type ColorAttribute string
func (ColorAttribute) Apply ¶
func (c ColorAttribute) Apply(e *Element)
type DisabledAttribute ¶
type DisabledAttribute bool
func (DisabledAttribute) Apply ¶
func (d DisabledAttribute) Apply(e *Element)
type DisplayAttribute ¶
type DisplayAttribute string
const ( DisplayBlock DisplayAttribute = "block" DisplayCompact DisplayAttribute = "compact" DisplayFlex DisplayAttribute = "flex" DisplayGrid DisplayAttribute = "grid" DisplayInline DisplayAttribute = "inline" DisplayInlineBlock DisplayAttribute = "inline-block" DisplayInlineFlex DisplayAttribute = "inline-flex" DisplayInlineTable DisplayAttribute = "inline-table" DisplayListItem DisplayAttribute = "list-item" DisplayMarker DisplayAttribute = "marker" DisplayNone DisplayAttribute = "none" DisplayRunIn DisplayAttribute = "run-in" DisplayTable DisplayAttribute = "table" DisplayTableCaption DisplayAttribute = "table-caption" DisplayTableCell DisplayAttribute = "table-cell" DisplayTableColumn DisplayAttribute = "table-column" DisplayTableColumnGroup DisplayAttribute = "table-column-group" DisplayTableHeaderGroup DisplayAttribute = "table-header-group" DisplayTableRow DisplayAttribute = "table-row" DisplayTableRowGroup DisplayAttribute = "table-row-group" DisplayInitial DisplayAttribute = "initial" DisplayInherit DisplayAttribute = "inherit" )
func (DisplayAttribute) Apply ¶
func (d DisplayAttribute) Apply(e *Element)
type Element ¶
func CreateElement ¶
func CreateElement(elementType ElementType) Element
func NewWebSocket ¶
func StringLiteral ¶
func (Element) AddEventListener ¶
func (Element) AppendChild ¶
func (Element) AppendChildren ¶
func (Element) RemoveChild ¶
func (Element) RemoveChildren ¶
func (Element) ReplaceChild ¶
func (Element) ReplacedWithEmpty ¶
type ElementAttribute ¶
type ElementAttribute interface {
Apply(*Element)
}
type ElementType ¶
type ElementType string
const ( ElementTypeA ElementType = "a" ElementTypeABBR ElementType = "abbr" ElementTypeAddress ElementType = "address" ElementTypeArea ElementType = "area" ElementTypeB ElementType = "b" ElementTypeBody ElementType = "body" ElementTypeBR ElementType = "br" ElementTypeButton ElementType = "button" ElementTypeCode ElementType = "code" ElementTypeCol ElementType = "col" ElementTypeColGroup ElementType = "colgroup" ElementTypeDiv ElementType = "div" ElementTypeH1 ElementType = "h1" ElementTypeH2 ElementType = "h2" ElementTypeH3 ElementType = "h3" ElementTypeH4 ElementType = "h4" ElementTypeH5 ElementType = "h5" ElementTypeH6 ElementType = "h6" ElementTypeHead ElementType = "head" ElementTypeHeader ElementType = "header" ElementTypeInput ElementType = "input" ElementTypeImage ElementType = "img" ElementTypeIFrame ElementType = "iframe" ElementTypeLI ElementType = "li" ElementTypeP ElementType = "p" ElementTypePre ElementType = "pre" ElementTypeSection ElementType = "section" ElementTypeSpan ElementType = "span" ElementTypeTable ElementType = "table" ElementTypeTD ElementType = "td" ElementTypeTHead ElementType = "thead" ElementTypeTitle ElementType = "title" ElementTypeTR ElementType = "tr" ElementTypeUL ElementType = "ul" )
type EventType ¶
type EventType string
const ( EventTypeAbort EventType = "abort" EventTypeAfterPrint EventType = "afterprint" EventTypeAnimationEnd EventType = "animationend" EventTypeAnimationIteration EventType = "animationiteration" EventTypeAnimationStart EventType = "animationstart" EventTypeBeforePrint EventType = "beforeprint" EventTypeBeforeUnload EventType = "beforeunload" EventTypeBlur EventType = "blur" EventTypeCanplay EventType = "canplay" EventTypeCanPlayThrough EventType = "canplaythrough" EventTypeChange EventType = "change" EventTypeClick EventType = "click" EventTypeContextMenu EventType = "contextmenu" EventTypeCopy EventType = "copy" EventTypeCut EventType = "cut" EventTypeDoubleClick EventType = "dblclick" EventTypeDrag EventType = "drag" EventTypeDragEnd EventType = "dragend" EventTypeDragEnter EventType = "dragenter" EventTypeDragLeave EventType = "dragleave" EventTypeDragOver EventType = "dragover" EventTypeDragStart EventType = "dragstart" EventTypeDrop EventType = "drop" EventTypeDurationChange EventType = "durationchange" EventTypeEnded EventType = "ended" EventTypeError EventType = "error" EventTypeFocus EventType = "focus" EventTypeFocusIn EventType = "focusin" EventTypeFocusOut EventType = "focusout" EventTypeFullscreenChange EventType = "fullscreenchange" EventTypeFullscreenError EventType = "fullscreenerror" EventTypeHashChange EventType = "hashchange" EventTypeInput EventType = "input" EventTypeInvalid EventType = "invalid" EventTypeKeyDown EventType = "keydown" EventTypeKeyPress EventType = "keypress" EventTypeKeyUp EventType = "keyup" EventTypeLoad EventType = "load" EventTypeLoadedData EventType = "loadeddata" EventTypeLoadedMetadata EventType = "loadedmetadata" EventTypeLoadStart EventType = "loadstart" EventTypeMessage EventType = "message" EventTypeMousedown EventType = "mousedown" EventTypeMouseEnter EventType = "mouseenter" EventTypeMouseLeave EventType = "mouseleave" EventTypeMouseMove EventType = "mousemove" EventTypeMouseOver EventType = "mouseover" EventTypeMouseOut EventType = "mouseout" EventTypeMouseUp EventType = "mouseup" EventTypeOffline EventType = "offline" EventTypeOnline EventType = "online" EventTypeOpen EventType = "open" EventTypePageHide EventType = "pagehide" EventTypePageShow EventType = "pageshow" EventTypePaste EventType = "paste" EventTypePause EventType = "pause" EventTypePlay EventType = "play" EventTypePlaying EventType = "playing" EventTypePopState EventType = "popstate" EventTypeProgress EventType = "progress" EventTypeRateChange EventType = "ratechange" EventTypeResize EventType = "resize" EventTypeReset EventType = "reset" EventTypeScroll EventType = "scroll" EventTypeSearch EventType = "search" EventTypeSeeked EventType = "seeked" EventTypeSeeking EventType = "seeking" EventTypeSelect EventType = "select" EventTypeShow EventType = "show" EventTypeStalled EventType = "stalled" EventTypeStorage EventType = "storage" EventTypeSubmit EventType = "submit" EventTypeSuspend EventType = "suspend" EventTypeTimeUpdate EventType = "timeupdate" EventTypeToggle EventType = "toggle" EventTypeTouchCancel EventType = "touchcancel" EventTypeTouchEnd EventType = "touchend" EventTypeTouchMove EventType = "touchmove" EventTypeTouchStart EventType = "touchstart" EventTypeTransitionEnd EventType = "transitionend" EventTypeUnload EventType = "unload" EventTypeVolumeChange EventType = "volumechange" EventTypeWaiting EventType = "waiting" EventTypeWheel EventType = "wheel" )
type FlexDirectionAttribute ¶
type FlexDirectionAttribute string
const ( FlexDirectionRow FlexDirectionAttribute = "row" FlexDirectionRowReverse FlexDirectionAttribute = "row-reverse" FlexDirectionColumn FlexDirectionAttribute = "column" FlexDirectionColumnReverse FlexDirectionAttribute = "column-reverse" FlexDirectionInitial FlexDirectionAttribute = "initial" FlexDirectionInherit FlexDirectionAttribute = "inherit" )
func (FlexDirectionAttribute) Apply ¶
func (f FlexDirectionAttribute) Apply(e *Element)
type HREFAttribute ¶
type HREFAttribute string
func (HREFAttribute) Apply ¶
func (h HREFAttribute) Apply(e *Element)
type HeightAttribute ¶
type HeightAttribute string
func (HeightAttribute) Apply ¶
func (h HeightAttribute) Apply(e *Element)
type MarginAttribute ¶
type MarginAttribute string
func (MarginAttribute) Apply ¶
func (m MarginAttribute) Apply(e *Element)
type PaddingAttribute ¶
type PaddingAttribute string
func (PaddingAttribute) Apply ¶
func (p PaddingAttribute) Apply(e *Element)
type PlaceholderAttribute ¶
type PlaceholderAttribute string
func (PlaceholderAttribute) Apply ¶
func (p PlaceholderAttribute) Apply(e *Element)
type PositionAttribute ¶
type PositionAttribute string
func (PositionAttribute) Apply ¶
func (p PositionAttribute) Apply(e *Element)
type StyleAttribute ¶
type StyleAttribute string
func (StyleAttribute) Apply ¶
func (s StyleAttribute) Apply(e *Element)
type TitleAttribute ¶
type TitleAttribute string
func (TitleAttribute) Apply ¶
func (t TitleAttribute) Apply(e *Element)
type TypeAttribute ¶
type TypeAttribute string
const ( TypeButton TypeAttribute = "button" TypeCheckbox TypeAttribute = "checkbox" TypeColor TypeAttribute = "color" TypeDate TypeAttribute = "date" TypeDatetime TypeAttribute = "datetime-local" TypeEmail TypeAttribute = "email" TypeFile TypeAttribute = "file" TypeHidden TypeAttribute = "hidden" TypeImage TypeAttribute = "image" TypeMonth TypeAttribute = "month" TypeNumber TypeAttribute = "number" TypePassword TypeAttribute = "password" TypeRadio TypeAttribute = "radio" TypeRange TypeAttribute = "range" TypeReset TypeAttribute = "reset" TypeSearch TypeAttribute = "search" TypeSubmit TypeAttribute = "submit" TypeTel TypeAttribute = "tel" TypeText TypeAttribute = "text" TypeTime TypeAttribute = "time" TypeURL TypeAttribute = "url" TypeWeek TypeAttribute = "week" )
func (TypeAttribute) Apply ¶
func (t TypeAttribute) Apply(e *Element)
type ValueAttribute ¶
type ValueAttribute string
func (ValueAttribute) Apply ¶
func (v ValueAttribute) Apply(e *Element)
type WidthAttribute ¶
type WidthAttribute string
func (WidthAttribute) Apply ¶
func (w WidthAttribute) Apply(e *Element)
Click to show internal directories.
Click to hide internal directories.