Documentation
¶
Overview ¶
Package html provides fluent, chainable HTML tag builder constructors and utility methods.
Index ¶
- type Element
- func A() *Element
- func Article() *Element
- func Aside() *Element
- func B() *Element
- func Blockquote() *Element
- func Br() *Element
- func Button() *Element
- func Cite() *Element
- func Code() *Element
- func Dd() *Element
- func Details() *Element
- func Div() *Element
- func Dl() *Element
- func Dt() *Element
- func Em() *Element
- func Fieldset() *Element
- func Figcaption() *Element
- func Figure() *Element
- func Footer() *Element
- func Form() *Element
- func H1() *Element
- func H2() *Element
- func H3() *Element
- func H4() *Element
- func H5() *Element
- func H6() *Element
- func Header() *Element
- func Hr() *Element
- func I() *Element
- func Img() *Element
- func Init(tag string) *Element
- func Input() *Element
- func Label() *Element
- func Legend() *Element
- func Li() *Element
- func Main() *Element
- func Mark() *Element
- func Nav() *Element
- func Ol() *Element
- func Option() *Element
- func P() *Element
- func Pre() *Element
- func Section() *Element
- func Select() *Element
- func Small() *Element
- func Span() *Element
- func Strong() *Element
- func Summary() *Element
- func Table() *Element
- func Tbody() *Element
- func Td() *Element
- func Textarea() *Element
- func Th() *Element
- func Thead() *Element
- func Time() *Element
- func Tr() *Element
- func Ul() *Element
- func (e *Element) AppendTo(parent dom.Handle) *Element
- func (e *Element) Attr(key, val string) *Element
- func (e *Element) Build() dom.Handle
- func (e *Element) Child(childHandle dom.Handle) *Element
- func (e *Element) Class(val string) *Element
- func (e *Element) HTML(val string) *Element
- func (e *Element) ID(val string) *Element
- func (e *Element) On(event string, cb js.Value) *Element
- func (e *Element) Text(val string) *Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
------------------------------------------------------------------------------------------------ Element is a chainable tag builder wrapper around a DOM element handle.
func Article ¶
func Article() *Element
------------------------------------------------------------------------------------------------ Semantic layout
func Blockquote ¶
func Blockquote() *Element
func Div ¶
func Div() *Element
------------------------------------------------------------------------------------------------ Structural tags
func Figcaption ¶
func Figcaption() *Element
func Figure ¶
func Figure() *Element
------------------------------------------------------------------------------------------------ Miscellaneous
func Form ¶
func Form() *Element
------------------------------------------------------------------------------------------------ Form elements
func H1 ¶
func H1() *Element
------------------------------------------------------------------------------------------------ Headings
func Img ¶
func Img() *Element
------------------------------------------------------------------------------------------------ Media / Void elements
func Init ¶
------------------------------------------------------------------------------------------------ Init creates a new builder instance for the specified HTML tag.
func Strong ¶
func Strong() *Element
------------------------------------------------------------------------------------------------ Inline formatting
func Table ¶
func Table() *Element
------------------------------------------------------------------------------------------------ Tables
func Ul ¶
func Ul() *Element
------------------------------------------------------------------------------------------------ Lists
func (*Element) AppendTo ¶
------------------------------------------------------------------------------------------------ AppendTo appends this element under a parent element.
func (*Element) Attr ¶
------------------------------------------------------------------------------------------------ Attr sets an arbitrary string attribute.
func (*Element) Build ¶
------------------------------------------------------------------------------------------------ Build returns the compiled element handle.
func (*Element) Child ¶
------------------------------------------------------------------------------------------------ Child appends another builder's element as a child.
func (*Element) Class ¶
------------------------------------------------------------------------------------------------ Class adds a class name to the element.
func (*Element) HTML ¶
------------------------------------------------------------------------------------------------ HTML sets the inner HTML content of the element.
func (*Element) ID ¶
------------------------------------------------------------------------------------------------ ID sets the element's DOM ID attribute.