Versions in this module Expand all Collapse all v1 v1.0.1 Mar 31, 2023 v1.0.0 Mar 30, 2023 Changes in this version + const DOCTYPE + var ErrOverflow = errors.New("elementBuffer: buffer overflow") + func ForEach(s T, f func(int, T)) + func NewBuffer(bufLen int, panicOnError ...bool) *elementBuffer + type Attr struct + Delimiter string + Key string + Value T + func NewAttr(k string, v T) Attr[T] + func NewBoolAttr(k string, v bool) Attr[bool] + func NewStringAttr(k string, v []string, d string) Attr[[]string] + func (a Attr[T]) String() string + func (a Attr[T]) ToBuffer(b *elementBuffer) + type Document struct + func NewDocument() *Document + func (d *Document) Body() *Element + func (d *Document) Buffer() *elementBuffer + func (d *Document) Bytes() []byte + func (d *Document) GetElementByID(id string) *Element + func (d *Document) GetElementsByClassName(className string) []*Element + func (d *Document) GetElementsByTagName(tagName string) []*Element + func (d *Document) Head() *Element + func (d *Document) Len() int + func (d *Document) Render(w io.Writer) error + func (d *Document) Root() *Element + func (d *Document) String() string + type Element struct + Attrs []Attr[[]string] + AutoClose bool + BoolAttrs []Attr[bool] + Children []*Element + InnerText string + SemicolAttrs []Attr[[]string] + Type string + func Add(elem T1, children ...T2) *Element + func HTML() *Element + func NewElement(t string) *Element + func UnRestrain(e T) *Element + func (e *Element) A(href string) *Element + func (e *Element) Abbr() *Element + func (e *Element) Add(children ...*Element) *Element + func (e *Element) Address() *Element + func (e *Element) Area() *Element + func (e *Element) Article() *Element + func (e *Element) Aside() *Element + func (e *Element) AsyncForEach(fn func(*Element) bool) + func (e *Element) Attr(k string, v ...string) *Element + func (e *Element) AttrBool(k string, v bool) *Element + func (e *Element) AttrSemiCol(k string, v ...string) *Element + func (e *Element) Audio() *Element + func (e *Element) B() *Element + func (e *Element) Bdi() *Element + func (e *Element) Bdo() *Element + func (e *Element) Blockquote() *Element + func (e *Element) Body() *Element + func (e *Element) Br() *Element + func (e *Element) Button() *Element + func (e *Element) Canvas() *Element + func (e *Element) Caption() *Element + func (e *Element) Cite() *Element + func (e *Element) Class(class ...string) *Element + func (e *Element) Code() *Element + func (e *Element) Col() *Element + func (e *Element) Colgroup() *Element + func (e *Element) Command() *Element + func (e *Element) Datalist() *Element + func (e *Element) Dd() *Element + func (e *Element) Del() *Element + func (e *Element) DelAttr(k string) *Element + func (e *Element) Details() *Element + func (e *Element) Dfn() *Element + func (e *Element) Div() *Element + func (e *Element) Dl() *Element + func (e *Element) Dt() *Element + func (e *Element) Element(elementType string) *Element + func (e *Element) Em() *Element + func (e *Element) Embed() *Element + func (e *Element) Fieldset() *Element + func (e *Element) Figcaption() *Element + func (e *Element) Figure() *Element + func (e *Element) Footer() *Element + func (e *Element) For(start, iterations, step int, f func(int) *Element) *Element + func (e *Element) ForEach(f func(int, *Element)) *Element + func (e *Element) Form() *Element + func (e *Element) GetAttr(k string) (stringsAttr []string, boolAttr, found bool) + func (e *Element) GetElementByElement(elem *Element) *Element + func (e *Element) GetElementByID(id string) *Element + func (e *Element) GetElementsByClassName(className string) []*Element + func (e *Element) GetElementsByTagName(tagName string) []*Element + func (e *Element) H1() *Element + func (e *Element) H2() *Element + func (e *Element) H3() *Element + func (e *Element) H4() *Element + func (e *Element) H5() *Element + func (e *Element) H6() *Element + func (e *Element) HTML(s string) *Element + func (e *Element) Header() *Element + func (e *Element) Hr() *RestrainedElement + func (e *Element) I() *Element + func (e *Element) ID(id string) *Element + func (e *Element) Iframe() *Element + func (e *Element) Img(src string, alt ...string) *Element + func (e *Element) Input() *RestrainedElement + func (e *Element) Ins() *Element + func (e *Element) Kbd() *Element + func (e *Element) Keygen() *Element + func (e *Element) Label() *Element + func (e *Element) Legend() *Element + func (e *Element) Main() *Element + func (e *Element) Map() *Element + func (e *Element) Mark() *Element + func (e *Element) Menu() *Element + func (e *Element) MetaCharset(v string) *RestrainedElement + func (e *Element) MetaTag(name string, content string) *RestrainedElement + func (e *Element) Meter() *Element + func (e *Element) Nav() *Element + func (e *Element) NextChild() *Element + func (e *Element) NoClose() *Element + func (e *Element) Object() *Element + func (e *Element) Ol() *HTMLLIST + func (e *Element) Optgroup() *Element + func (e *Element) Output() *Element + func (e *Element) P() *Element + func (e *Element) Param() *Element + func (e *Element) Pre() *Element + func (e *Element) PrevChild() *Element + func (e *Element) Progress() *Element + func (e *Element) Q() *Element + func (e *Element) Rp() *Element + func (e *Element) Rt() *Element + func (e *Element) Ruby() *Element + func (e *Element) S() *Element + func (e *Element) Samp() *Element + func (e *Element) Section() *Element + func (e *Element) Select(name string) *HTMLSELECT + func (e *Element) Small() *Element + func (e *Element) Source() *Element + func (e *Element) Span() *Element + func (e *Element) String() string + func (e *Element) Strong() *Element + func (e *Element) Sub() *Element + func (e *Element) Summary() *Element + func (e *Element) Sup() *Element + func (e *Element) Table() *HTMLTABLE + func (e *Element) Text(s string) *Element + func (e *Element) Textarea() *Element + func (e *Element) Textf(format string, a ...interface{}) *Element + func (e *Element) Time() *Element + func (e *Element) Track() *Element + func (e *Element) U() *Element + func (e *Element) Ul() *HTMLLIST + func (e *Element) Var() *Element + func (e *Element) Video() *Element + func (e *Element) Wbr() *Element + type ElementConstraint interface + type HTMLLIST Element + func (e *HTMLLIST) Li() *Element + type HTMLSELECT Element + func (e *HTMLSELECT) Option(value, text string) *Element + type HTMLTABLE Element + func (e *HTMLTABLE) Tbody() *Element + func (e *HTMLTABLE) Td() *Element + func (e *HTMLTABLE) Tfoot() *Element + func (e *HTMLTABLE) Th() *Element + func (e *HTMLTABLE) Thead() *Element + func (e *HTMLTABLE) Tr() *Element + type RestrainedElement Element + func Restrain(e T) *RestrainedElement + func (e *RestrainedElement) Attr(k string, v ...string) *RestrainedElement + func (e *RestrainedElement) AttrBool(k string, v bool) *RestrainedElement + func (e *RestrainedElement) AttrSemicol(k string, v ...string) *RestrainedElement