dom

package
v0.0.0-...-50490d6 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AutocapitalizeCharacters = "characters"
	AutocapitalizeNone       = "none"
	AutocapitalizeOff        = "off"
	AutocapitalizeOn         = "on"
	AutocapitalizeSentences  = "sentences"
	AutocapitalizeWords      = "words"
)
View Source
const (
	ContenteditableTrue  = "true"
	ContenteditableFalse = "false"
)
View Source
const (
	DirAuto = "auto"
	DirLtr  = "ltr"
	DirRtl  = "rtl"
)
View Source
const (
	DraggableTrue  = "true"
	DraggableFalse = "false"
)
View Source
const (
	EnterkeyhintDone     = "done"
	EnterkeyhintEnter    = "enter"
	EnterkeyhintGo       = "go"
	EnterkeyhintNext     = "next"
	EnterkeyhintPrevious = "previous"
	EnterkeyhintSearch   = "search"
	EnterkeyhintSend     = "send"
)
View Source
const (
	InputmodeDecimal = "decimal"
	InputmodeEmail   = "email"
	InputmodeNone    = "none"
	InputmodeNumeric = "numeric"
	InputmodeSearch  = "search"
	InputmodeTel     = "tel"
	InputmodeText    = "text"
	InputmodeUrl     = "url"
)
View Source
const (
	RoleAlert                    = "alert"
	RoleAlertdialog              = "alertdialog"
	RoleApplication              = "application"
	RoleArticle                  = "article"
	RoleAssociationlist          = "associationlist"
	RoleAssociationlistitemkey   = "associationlistitemkey"
	RoleAssociationlistitemvalue = "associationlistitemvalue"
	RoleBanner                   = "banner"
	RoleBlockquote               = "blockquote"
	RoleCaption                  = "caption"
	RoleCell                     = "cell"
	RoleColumnheader             = "columnheader"
	RoleCommand                  = "command"
	RoleComment                  = "comment"
	RoleComplementary            = "complementary"
	RoleComposite                = "composite"
	RoleContentinfo              = "contentinfo"
	RoleDefinition               = "definition"
	RoleDeletion                 = "deletion"
	RoleDialog                   = "dialog"
	RoleDirectory                = "directory"
	RoleDocument                 = "document"
	RoleEmphasis                 = "emphasis"
	RoleFeed                     = "feed"
	RoleFigure                   = "figure"
	RoleForm                     = "form"
	RoleGeneric                  = "generic"
	RoleGridcell                 = "gridcell"
	RoleGroup                    = "group"
	RoleHeading                  = "heading"
	RoleImg                      = "img"
	RoleInput                    = "input"
	RoleInsertion                = "insertion"
	RoleLabel                    = "label"
	RoleLegend                   = "legend"
	RoleList                     = "list"
	RoleListitem                 = "listitem"
	RoleLog                      = "log"
	RoleMain                     = "main"
	RoleMark                     = "mark"
	RoleMarquee                  = "marquee"
	RoleMath                     = "math"
	RoleMeter                    = "meter"
	RoleNavigation               = "navigation"
	RoleNone                     = "none"
	RoleNote                     = "note"
	RoleParagraph                = "paragraph"
	RolePresentation             = "presentation"
	RoleProgressbar              = "progressbar"
	RoleRegion                   = "region"
	RoleRow                      = "row"
	RoleRowgroup                 = "rowgroup"
	RoleRowheader                = "rowheader"
	RoleScrollbar                = "scrollbar"
	RoleSearch                   = "search"
	RoleSeparator                = "separator"
	RoleStatus                   = "status"
	RoleStrong                   = "strong"
	RoleSubscript                = "subscript"
	RoleSuggestion               = "suggestion"
	RoleSuperscript              = "superscript"
	RoleTab                      = "tab"
	RoleTable                    = "table"
	RoleTerm                     = "term"
	RoleTime                     = "time"
	RoleTimer                    = "timer"
	RoleToolbar                  = "toolbar"
	RoleTooltip                  = "tooltip"
)
View Source
const (
	SpellcheckTrue  = "true"
	SpellcheckFalse = "false"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element interface {
	Render(buffer io.Writer)
}

type EventHandler

type EventHandler func()

type Tag

type Tag struct {
	Name           string
	InnerHTML      string
	Attributes     map[string]string
	BoolAttributes map[string]bool
	IntAttributes  map[string]int
	SSLAttributes  map[string][]string
	Children       []Element
	Handlers       map[string][]EventHandler
	OmitEndTag     bool
}

func (*Tag) AddChild

func (o *Tag) AddChild(child Element) *Tag

AddChild adds a child tag to the tag

func (*Tag) AddOnclickHandler

func (o *Tag) AddOnclickHandler(handler EventHandler) *Tag

func (*Tag) AppendAccesskey

func (o *Tag) AppendAccesskey(accesskey string) *Tag

func (*Tag) AppendClass

func (o *Tag) AppendClass(class string) *Tag

func (*Tag) AppendItemprop

func (o *Tag) AppendItemprop(itemprop string) *Tag

func (*Tag) AppendItemref

func (o *Tag) AppendItemref(itemref string) *Tag

func (*Tag) AppendItemtype

func (o *Tag) AppendItemtype(itemtype string) *Tag

func (*Tag) PrependAccesskey

func (o *Tag) PrependAccesskey(accesskey string) *Tag

func (*Tag) PrependClass

func (o *Tag) PrependClass(class string) *Tag

func (*Tag) PrependItemprop

func (o *Tag) PrependItemprop(itemprop string) *Tag

func (*Tag) PrependItemref

func (o *Tag) PrependItemref(itemref string) *Tag

func (*Tag) PrependItemtype

func (o *Tag) PrependItemtype(itemtype string) *Tag

func (*Tag) Render

func (tag *Tag) Render(buffer io.Writer)

func (*Tag) WithAutocapitalize

func (o *Tag) WithAutocapitalize(autocapitalize string) *Tag

func (*Tag) WithAutofocus

func (o *Tag) WithAutofocus(autofocus bool) *Tag

func (*Tag) WithContenteditable

func (o *Tag) WithContenteditable(contenteditable string) *Tag

func (*Tag) WithDir

func (o *Tag) WithDir(dir string) *Tag

func (*Tag) WithDraggable

func (o *Tag) WithDraggable(draggable string) *Tag

func (*Tag) WithEnterkeyhint

func (o *Tag) WithEnterkeyhint(enterkeyhint string) *Tag

func (*Tag) WithHidden

func (o *Tag) WithHidden(hidden bool) *Tag

func (*Tag) WithId

func (o *Tag) WithId(id string) *Tag

func (*Tag) WithInputmode

func (o *Tag) WithInputmode(inputmode string) *Tag

func (*Tag) WithIs

func (o *Tag) WithIs(is string) *Tag

func (*Tag) WithItemid

func (o *Tag) WithItemid(itemid string) *Tag

func (*Tag) WithItemscope

func (o *Tag) WithItemscope(itemscope bool) *Tag

func (*Tag) WithLang

func (o *Tag) WithLang(lang string) *Tag

func (*Tag) WithNonce

func (o *Tag) WithNonce(nonce string) *Tag

func (*Tag) WithRole

func (o *Tag) WithRole(role string) *Tag

func (*Tag) WithSlot

func (o *Tag) WithSlot(slot string) *Tag

func (*Tag) WithSpellcheck

func (o *Tag) WithSpellcheck(spellcheck string) *Tag

func (*Tag) WithStyle

func (o *Tag) WithStyle(style string) *Tag

func (*Tag) WithTabindex

func (o *Tag) WithTabindex(tabindex int) *Tag

func (*Tag) WithTitle

func (o *Tag) WithTitle(title string) *Tag

type TextNode

type TextNode struct {
	Text string
}

func (*TextNode) Render

func (o *TextNode) Render(buffer io.Writer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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