element

package
v0.0.0-...-ce8c22f Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AutocompleteON  = "on"
	AutocompleteOFF = "off"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	CommonElement
}

func GetBody

func GetBody() *Body

type Canvas

type Canvas struct {
	CommonElement
	Context js.Value
	Height  string `htmlattr:"height"`
	Width   string `htmlattr:"width"`
}

func NewCanvas

func NewCanvas() *Canvas

func (*Canvas) Get2DContext

func (c *Canvas) Get2DContext()

func (*Canvas) SetHeight

func (c *Canvas) SetHeight(value string)

func (*Canvas) SetWidth

func (c *Canvas) SetWidth(value string)

type CommonElement

type CommonElement struct {
	Object js.Value
	Child  []interface{}
	Class  []string
	event.BaseEvent
}

func (*CommonElement) AddCanvas

func (c *CommonElement) AddCanvas() *Canvas

func (*CommonElement) AddClass

func (c *CommonElement) AddClass(class string)

func (*CommonElement) AddDiv

func (c *CommonElement) AddDiv() *Div

func (*CommonElement) AddInput

func (c *CommonElement) AddInput() *Input

func (*CommonElement) AddLabel

func (c *CommonElement) AddLabel() *Label

func (*CommonElement) AddLi

func (c *CommonElement) AddLi() *Li

func (*CommonElement) AddUl

func (c *CommonElement) AddUl() *Ul

func (*CommonElement) DefaultDir

func (c *CommonElement) DefaultDir()

Remove HTML attribute DIR

func (*CommonElement) DefualtSpellcheck

func (c *CommonElement) DefualtSpellcheck()

Remove SPELLCHECK attribute

func (*CommonElement) DisableDraggable

func (c *CommonElement) DisableDraggable()

func (*CommonElement) DisableEdit

func (c *CommonElement) DisableEdit()

Set HTML attribute CONTENTEDITABLE 'false'

func (*CommonElement) DisableSpellcheck

func (c *CommonElement) DisableSpellcheck()

Disable SPELLCHECK attribute

func (*CommonElement) EnableDraggable

func (c *CommonElement) EnableDraggable()

func (*CommonElement) EnableEdit

func (c *CommonElement) EnableEdit()

Set HTML attribute CONTENTEDITABLE 'true'

func (*CommonElement) EnableSpellcheck

func (c *CommonElement) EnableSpellcheck()

Enable SPELLCHECK attribute

func (*CommonElement) Generate

func (c *CommonElement) Generate()

func (*CommonElement) GetAccesskey

func (c *CommonElement) GetAccesskey() string

Get HTML attribute ACCESSKEY

func (*CommonElement) GetChildren

func (c *CommonElement) GetChildren() (js.Value, error)

func (*CommonElement) GetDir

func (c *CommonElement) GetDir() string

Get HTML attribute DIR ltr - left to right rtl - right to left

func (*CommonElement) GetID

func (c *CommonElement) GetID() string

Get HTML attribute ID

func (*CommonElement) GetLang

func (c *CommonElement) GetLang() string

Get HTML attribute LANG

func (*CommonElement) GetStyle

func (c *CommonElement) GetStyle() string

Get STYLE attribute

func (*CommonElement) GetTabindex

func (c *CommonElement) GetTabindex() int32

Get TABINDEX attribute

func (*CommonElement) GetTitle

func (c *CommonElement) GetTitle() string

Get HTML attribute TITLE

func (*CommonElement) IsEditable

func (c *CommonElement) IsEditable() (bool, error)

Get HTML attribute CONTENTEDITABLE TRUE - Edit Enable FALSE - Edit Disable

func (*CommonElement) IsHidden

func (c *CommonElement) IsHidden() bool

Get HTML attribute HIDDEN

func (*CommonElement) IsSpellcheck

func (c *CommonElement) IsSpellcheck() (bool, error)

Get SPELLCHECK attribute value

func (*CommonElement) RemoveAccesskey

func (c *CommonElement) RemoveAccesskey()

Remove HTML attribute ACCESSKEY

func (*CommonElement) RemoveAllChild

func (c *CommonElement) RemoveAllChild()

func (*CommonElement) RemoveContenEditable

func (c *CommonElement) RemoveContenEditable()

Remove HTML attribute CONTENEDITABLE

func (*CommonElement) RemoveDraggable

func (c *CommonElement) RemoveDraggable()

func (*CommonElement) RemoveHidden

func (c *CommonElement) RemoveHidden()

Remove HTML attribute HIDDEN

func (*CommonElement) RemoveLang

func (c *CommonElement) RemoveLang()

Remove HTML attribure LANG

func (*CommonElement) RemoveStyle

func (c *CommonElement) RemoveStyle()

Remove STYLE attribute

func (*CommonElement) RemoveTabindex

func (c *CommonElement) RemoveTabindex()

Remove TABINDEX attribute

func (*CommonElement) SetAccesskey

func (c *CommonElement) SetAccesskey(key string)

Set HTML attribute ACCESSKEY

func (*CommonElement) SetHidden

func (c *CommonElement) SetHidden()

Set HTML attribute HIDDEN

func (*CommonElement) SetID

func (c *CommonElement) SetID(id string)

Set HTML attribute ID

func (*CommonElement) SetLTRDir

func (c *CommonElement) SetLTRDir()

Set HTML attribute DIR left to right

func (*CommonElement) SetLang

func (c *CommonElement) SetLang(langCode string)

Set HTML attribute LANG lang code

func (*CommonElement) SetRTLDir

func (c *CommonElement) SetRTLDir()

Set HTML attribute DIR right to left

func (*CommonElement) SetStyle

func (c *CommonElement) SetStyle(style string)

Set STYLE attribute

func (*CommonElement) SetTabindex

func (c *CommonElement) SetTabindex(index int32)

Set TABINDEX attribute

func (*CommonElement) SetTitle

func (c *CommonElement) SetTitle(title string)

Set HTML attribute TITLE

type Div

type Div struct {
	CommonElement
}

func NewDiv

func NewDiv() *Div

func (*Div) GetAlign

func (d *Div) GetAlign() string

func (*Div) GetObject

func (d *Div) GetObject() js.Value

func (*Div) SetAlign

func (d *Div) SetAlign(align string)

func (*Div) SetInnerHtml

func (d *Div) SetInnerHtml(value string)

type HtmlGenerator

type HtmlGenerator interface {
	Generate()
	GetObject() js.Value
}

type Input

type Input struct {
	CommonElement
}

func NewInput

func NewInput() *Input

func (*Input) GetValue

func (i *Input) GetValue() js.Value

func (*Input) SetType

func (i *Input) SetType(inputType string)

func (*Input) SetValue

func (i *Input) SetValue(value string)

type Label

type Label struct {
	CommonElement
	For       string `htmlattr:"for"`
	InnerHtml string
}

func NewLabel

func NewLabel() Label

func (*Label) Generate

func (l *Label) Generate()

type Li

type Li struct {
	CommonElement
	Type  string `htmlattr:"type"`
	Value string `htmlattr:"Value"`
}

func NewLi

func NewLi() *Li

func (*Li) SetInnerHtml

func (l *Li) SetInnerHtml(value string)

func (*Li) SetType

func (l *Li) SetType(value string)

func (*Li) SetValue

func (l *Li) SetValue(value string)

type Ul

type Ul struct {
	CommonElement
}

func NewUl

func NewUl() *Ul

func (*Ul) SetType

func (u *Ul) SetType(ulType string)

Jump to

Keyboard shortcuts

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