Documentation ¶
Index ¶
- Variables
- func AssertUniqueID(t Tag, ctx context.Context) (idToken *tokens.String, err error)
- func FindID(tag Tag, idToken *tokens.String) (Tag, int, Tag, bool, error)
- func IsTag(key string) bool
- func NewUniqueClass() string
- func NewUniqueID() string
- func RegisterParents(root Tag)
- func RoundScalar(s float64, prec float64) float64
- func WalkText(current Tag, prev []Tag, fn func([]Tag, string) error) error
- type Body
- func (t *Body) AppendChild(child Tag)
- func (t *Body) Attributes() *tokens.StringDict
- func (t *Body) Children() []Tag
- func (t *Body) CollectIDs(idMap IDMap) error
- func (t *Body) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Body) Context() context.Context
- func (t *Body) DeleteAllChildren() error
- func (t *Body) DeleteChild(i int) error
- func (t *Body) EvalLazy() error
- func (t *Body) FinalParent() tokens.FinalTag
- func (t *Body) FoldDummy()
- func (t *Body) GetID() string
- func (t *Body) InsertChild(i int, child Tag) error
- func (t *Body) LaterSiblings() []Tag
- func (t *Body) Name() string
- func (t *Body) NumChildren() int
- func (t *Body) Parent() Tag
- func (t *Body) RegisterParent(p Tag)
- func (t *Body) SetID(id string)
- func (t *Body) Siblings() []Tag
- func (t *Body) Validate() error
- func (t *Body) ValidateChildren() error
- func (t *Body) VerifyElementCount(i int, ecKey string) error
- type Br
- func (t *Br) AppendChild(child Tag)
- func (t *Br) Attributes() *tokens.StringDict
- func (t *Br) Children() []Tag
- func (t *Br) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Br) Context() context.Context
- func (t *Br) DeleteAllChildren() error
- func (t *Br) DeleteChild(i int) error
- func (t *Br) EvalLazy() error
- func (t *Br) FinalParent() tokens.FinalTag
- func (t *Br) FoldDummy()
- func (t *Br) GetID() string
- func (t *Br) InsertChild(i int, child Tag) error
- func (t *Br) LaterSiblings() []Tag
- func (t *Br) Name() string
- func (t *Br) NumChildren() int
- func (t *Br) Parent() Tag
- func (t *Br) RegisterParent(p Tag)
- func (t *Br) SetID(id string)
- func (t *Br) Siblings() []Tag
- func (t *Br) Validate() error
- func (t *Br) ValidateChildren() error
- func (t *Br) VerifyElementCount(i int, ecKey string) error
- type ClassMap
- type ClassMapData
- type Div
- func (t *Div) AppendChild(child Tag)
- func (t *Div) Attributes() *tokens.StringDict
- func (t *Div) Children() []Tag
- func (t *Div) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Div) Context() context.Context
- func (t *Div) DeleteAllChildren() error
- func (t *Div) DeleteChild(i int) error
- func (t *Div) EvalLazy() error
- func (t *Div) FinalParent() tokens.FinalTag
- func (t *Div) FoldDummy()
- func (t *Div) GetID() string
- func (t *Div) InsertChild(i int, child Tag) error
- func (t *Div) LaterSiblings() []Tag
- func (t *Div) Name() string
- func (t *Div) NumChildren() int
- func (t *Div) Parent() Tag
- func (t *Div) RegisterParent(p Tag)
- func (t *Div) SetID(id string)
- func (t *Div) Siblings() []Tag
- func (t *Div) Validate() error
- func (t *Div) ValidateChildren() error
- func (t *Div) VerifyElementCount(i int, ecKey string) error
- type DocType
- func (t *DocType) AppendChild(child Tag)
- func (t *DocType) Attributes() *tokens.StringDict
- func (t *DocType) Children() []Tag
- func (t *DocType) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *DocType) Context() context.Context
- func (t *DocType) DeleteAllChildren() error
- func (t *DocType) DeleteChild(i int) error
- func (t *DocType) EvalLazy() error
- func (t *DocType) FinalParent() tokens.FinalTag
- func (t *DocType) FoldDummy()
- func (t *DocType) GetID() string
- func (t *DocType) InsertChild(i int, child Tag) error
- func (t *DocType) LaterSiblings() []Tag
- func (t *DocType) Name() string
- func (t *DocType) NumChildren() int
- func (t *DocType) Parent() Tag
- func (t *DocType) RegisterParent(p Tag)
- func (t *DocType) SetID(id string)
- func (t *DocType) Siblings() []Tag
- func (t *DocType) Validate() error
- func (t *DocType) ValidateChildren() error
- func (t *DocType) VerifyElementCount(i int, ecKey string) error
- func (t *DocType) Write(indent string, nl, tab string) string
- type Dummy
- func (t *Dummy) AppendChild(child Tag)
- func (t *Dummy) Attributes() *tokens.StringDict
- func (t *Dummy) Children() []Tag
- func (t *Dummy) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Dummy) Compress(vb SVGViewBox)
- func (t *Dummy) Context() context.Context
- func (t *Dummy) DeleteAllChildren() error
- func (t *Dummy) DeleteChild(i int) error
- func (t *Dummy) EvalLazy() error
- func (t *Dummy) FinalParent() tokens.FinalTag
- func (t *Dummy) FoldDummy()
- func (t *Dummy) GetID() string
- func (t *Dummy) InsertChild(i int, child Tag) error
- func (t *Dummy) LaterSiblings() []Tag
- func (t *Dummy) Minify() bool
- func (t *Dummy) Name() string
- func (t *Dummy) NumChildren() int
- func (t *Dummy) Parent() Tag
- func (t *Dummy) RegisterParent(p Tag)
- func (t *Dummy) SetID(id string)
- func (t *Dummy) Siblings() []Tag
- func (t *Dummy) Validate() error
- func (t *Dummy) ValidateChildren() error
- func (t *Dummy) VerifyElementCount(i int, ecKey string) error
- func (t *Dummy) Write(indent string, nl, tab string) string
- type GenBuilder
- type Generic
- func (t *Generic) AppendChild(child Tag)
- func (t *Generic) Attributes() *tokens.StringDict
- func (t *Generic) Children() []Tag
- func (t *Generic) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Generic) Context() context.Context
- func (t *Generic) DeleteAllChildren() error
- func (t *Generic) DeleteChild(i int) error
- func (t *Generic) EvalLazy() error
- func (t *Generic) FinalParent() tokens.FinalTag
- func (t *Generic) FoldDummy()
- func (t *Generic) GetID() string
- func (t *Generic) InsertChild(i int, child Tag) error
- func (t *Generic) LaterSiblings() []Tag
- func (t *Generic) Name() string
- func (t *Generic) NumChildren() int
- func (t *Generic) Parent() Tag
- func (t *Generic) RegisterParent(p Tag)
- func (t *Generic) SetID(id string)
- func (t *Generic) Siblings() []Tag
- func (t *Generic) Validate() error
- func (t *Generic) ValidateChildren() error
- func (t *Generic) VerifyElementCount(i int, ecKey string) error
- func (t *Generic) Write(indent string, nl, tab string) string
- type HTML
- func (t *HTML) AppendChild(child Tag)
- func (t *HTML) ApplyControl(control string, jsUrl string) error
- func (t *HTML) Attributes() *tokens.StringDict
- func (t *HTML) Children() []Tag
- func (t *HTML) CollectIDs(idMap IDMap) error
- func (t *HTML) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *HTML) Context() context.Context
- func (t *HTML) DeleteAllChildren() error
- func (t *HTML) DeleteChild(i int) error
- func (t *HTML) EvalLazy() error
- func (t *HTML) FinalParent() tokens.FinalTag
- func (t *HTML) FoldDummy()
- func (t *HTML) GetClasses() []string
- func (t *HTML) GetID() string
- func (t *HTML) IncludeControl(code string) error
- func (t *HTML) IncludeStyle(style string) error
- func (t *HTML) InnerHTML() string
- func (t *HTML) InsertChild(i int, child Tag) error
- func (t *HTML) LaterSiblings() []Tag
- func (t *HTML) Name() string
- func (t *HTML) NumChildren() int
- func (t *HTML) Parent() Tag
- func (t *HTML) RegisterParent(p Tag)
- func (t *HTML) SetClasses(cs []string)
- func (t *HTML) SetID(id string)
- func (t *HTML) SetStyleURL(cssUrl string) error
- func (t *HTML) Siblings() []Tag
- func (t *HTML) ToJSType() string
- func (t *HTML) Validate() error
- func (t *HTML) ValidateChildren() error
- func (t *HTML) VerifyElementCount(i int, ecKey string) error
- func (t *HTML) Write(indent string, nl, tab string) string
- type Head
- func (t *Head) AppendChild(child Tag)
- func (t *Head) Attributes() *tokens.StringDict
- func (t *Head) Children() []Tag
- func (t *Head) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Head) Context() context.Context
- func (t *Head) DeleteAllChildren() error
- func (t *Head) DeleteChild(i int) error
- func (t *Head) EvalLazy() error
- func (t *Head) FinalParent() tokens.FinalTag
- func (t *Head) FoldDummy()
- func (t *Head) GetID() string
- func (t *Head) InsertChild(i int, child Tag) error
- func (t *Head) LaterSiblings() []Tag
- func (t *Head) Name() string
- func (t *Head) NumChildren() int
- func (t *Head) Parent() Tag
- func (t *Head) RegisterParent(p Tag)
- func (t *Head) SetID(id string)
- func (t *Head) Siblings() []Tag
- func (t *Head) Validate() error
- func (t *Head) ValidateChildren() error
- func (t *Head) VerifyElementCount(i int, ecKey string) error
- func (t *Head) Write(indent string, nl, tab string) string
- type IDMap
- type IDMapData
- type IDMapTag
- type Img
- func (t *Img) AppendChild(child Tag)
- func (t *Img) Attributes() *tokens.StringDict
- func (t *Img) Children() []Tag
- func (t *Img) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Img) Context() context.Context
- func (t *Img) DeleteAllChildren() error
- func (t *Img) DeleteChild(i int) error
- func (t *Img) EvalLazy() error
- func (t *Img) FinalParent() tokens.FinalTag
- func (t *Img) FoldDummy()
- func (t *Img) GetID() string
- func (t *Img) InsertChild(i int, child Tag) error
- func (t *Img) LaterSiblings() []Tag
- func (t *Img) Name() string
- func (t *Img) NumChildren() int
- func (t *Img) Parent() Tag
- func (t *Img) RegisterParent(p Tag)
- func (t *Img) SetID(id string)
- func (t *Img) Siblings() []Tag
- func (t *Img) Validate() error
- func (t *Img) ValidateChildren() error
- func (t *Img) VerifyElementCount(i int, ecKey string) error
- func (t *Img) Write(indent string, nl, tab string) string
- type Input
- func (t *Input) AppendChild(child Tag)
- func (t *Input) Attributes() *tokens.StringDict
- func (t *Input) Children() []Tag
- func (t *Input) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Input) Context() context.Context
- func (t *Input) DeleteAllChildren() error
- func (t *Input) DeleteChild(i int) error
- func (t *Input) EvalLazy() error
- func (t *Input) FinalParent() tokens.FinalTag
- func (t *Input) FoldDummy()
- func (t *Input) GetID() string
- func (t *Input) InsertChild(i int, child Tag) error
- func (t *Input) LaterSiblings() []Tag
- func (t *Input) Name() string
- func (t *Input) NumChildren() int
- func (t *Input) Parent() Tag
- func (t *Input) RegisterParent(p Tag)
- func (t *Input) SetID(id string)
- func (t *Input) Siblings() []Tag
- func (t *Input) Validate() error
- func (t *Input) ValidateChildren() error
- func (t *Input) VerifyElementCount(i int, ecKey string) error
- type LeafTag
- func (t *LeafTag) AppendChild(child Tag)
- func (t *LeafTag) Attributes() *tokens.StringDict
- func (t *LeafTag) Children() []Tag
- func (t *LeafTag) CollectIDs(idMap IDMap) error
- func (t *LeafTag) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *LeafTag) Context() context.Context
- func (t *LeafTag) DeleteAllChildren() error
- func (t *LeafTag) DeleteChild(i int) error
- func (t *LeafTag) EvalLazy() error
- func (t *LeafTag) FinalParent() tokens.FinalTag
- func (t *LeafTag) FindID(id *tokens.String) (Tag, int, Tag, bool, error)
- func (t *LeafTag) FoldDummy()
- func (t *LeafTag) GetClasses() []string
- func (t *LeafTag) GetID() string
- func (t *LeafTag) InsertChild(i int, child Tag) error
- func (t *LeafTag) LaterSiblings() []Tag
- func (t *LeafTag) Name() string
- func (t *LeafTag) NumChildren() int
- func (t *LeafTag) Parent() Tag
- func (t *LeafTag) RegisterParent(p Tag)
- func (t *LeafTag) SetClasses(cs []string)
- func (t *LeafTag) SetID(s string)
- func (t *LeafTag) Siblings() []Tag
- func (t *LeafTag) Validate() error
- func (t *LeafTag) VerifyElementCount(i int, ecKey string) error
- func (t *LeafTag) Write(indent string, nl, tab string) string
- type Link
- func (t *Link) AppendChild(child Tag)
- func (t *Link) Attributes() *tokens.StringDict
- func (t *Link) Children() []Tag
- func (t *Link) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Link) Context() context.Context
- func (t *Link) DeleteAllChildren() error
- func (t *Link) DeleteChild(i int) error
- func (t *Link) EvalLazy() error
- func (t *Link) FinalParent() tokens.FinalTag
- func (t *Link) FoldDummy()
- func (t *Link) GetID() string
- func (t *Link) InsertChild(i int, child Tag) error
- func (t *Link) LaterSiblings() []Tag
- func (t *Link) Name() string
- func (t *Link) NumChildren() int
- func (t *Link) Parent() Tag
- func (t *Link) RegisterParent(p Tag)
- func (t *Link) SetID(id string)
- func (t *Link) Siblings() []Tag
- func (t *Link) Validate() error
- func (t *Link) ValidateChildren() error
- func (t *Link) VerifyElementCount(i int, ecKey string) error
- func (t *Link) Write(indent string, nl, tab string) string
- type LoaderScript
- type Meta
- func (t *Meta) AppendChild(child Tag)
- func (t *Meta) Attributes() *tokens.StringDict
- func (t *Meta) Children() []Tag
- func (t *Meta) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Meta) Context() context.Context
- func (t *Meta) DeleteAllChildren() error
- func (t *Meta) DeleteChild(i int) error
- func (t *Meta) EvalLazy() error
- func (t *Meta) FinalParent() tokens.FinalTag
- func (t *Meta) FoldDummy()
- func (t *Meta) GetID() string
- func (t *Meta) InsertChild(i int, child Tag) error
- func (t *Meta) LaterSiblings() []Tag
- func (t *Meta) Name() string
- func (t *Meta) NumChildren() int
- func (t *Meta) Parent() Tag
- func (t *Meta) RegisterParent(p Tag)
- func (t *Meta) SetID(id string)
- func (t *Meta) Siblings() []Tag
- func (t *Meta) Validate() error
- func (t *Meta) ValidateChildren() error
- func (t *Meta) VerifyElementCount(i int, ecKey string) error
- func (t *Meta) Write(indent string, nl, tab string) string
- type NoChildrenBuilder
- type Root
- func (t *Root) AppendChild(child Tag)
- func (t *Root) ApplyControl(control string, jsUrl string) error
- func (t *Root) Attributes() *tokens.StringDict
- func (t *Root) Children() []Tag
- func (t *Root) CollectIDs(idMap IDMap) error
- func (t *Root) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Root) Context() context.Context
- func (t *Root) DeleteAllChildren() error
- func (t *Root) DeleteChild(i int) error
- func (t *Root) EvalLazy() error
- func (t *Root) FinalParent() tokens.FinalTag
- func (t *Root) FoldDummy()
- func (t *Root) GetDocTypeAndHTML() (*DocType, *HTML, error)
- func (t *Root) GetID() string
- func (t *Root) IncludeControl(code string) error
- func (t *Root) IncludeStyle(styles string) error
- func (t *Root) InsertChild(i int, child Tag) error
- func (t *Root) LaterSiblings() []Tag
- func (t *Root) Name() string
- func (t *Root) NumChildren() int
- func (t *Root) Parent() Tag
- func (t *Root) RegisterParent(p Tag)
- func (t *Root) SetID(id string)
- func (t *Root) SetStyleURL(cssUrl string) error
- func (t *Root) Siblings() []Tag
- func (t *Root) Validate() error
- func (t *Root) ValidateChildren() error
- func (t *Root) VerifyElementCount(i int, ecKey string) error
- func (t *Root) Write(indent string, nl string, tab string) string
- type SVG
- func (t *SVG) AppendChild(child Tag)
- func (t *SVG) Attributes() *tokens.StringDict
- func (t *SVG) Children() []Tag
- func (t *SVG) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *SVG) Compress(vb SVGViewBox)
- func (t *SVG) Context() context.Context
- func (t *SVG) DeleteAllChildren() error
- func (t *SVG) DeleteChild(i int) error
- func (t *SVG) EvalLazy() error
- func (t *SVG) FinalParent() tokens.FinalTag
- func (t *SVG) FoldDummy()
- func (t *SVG) GetID() string
- func (t *SVG) InsertChild(i int, child Tag) error
- func (t *SVG) LaterSiblings() []Tag
- func (t *SVG) Minify() bool
- func (t *SVG) Name() string
- func (t *SVG) NumChildren() int
- func (t *SVG) Parent() Tag
- func (t *SVG) RegisterParent(p Tag)
- func (t *SVG) SetID(id string)
- func (t *SVG) Siblings() []Tag
- func (t *SVG) Validate() error
- func (t *SVG) ValidateChildren() error
- func (t *SVG) VerifyElementCount(i int, ecKey string) error
- func (t *SVG) Write(indent string, nl, tab string) string
- type SVGRoot
- func (t *SVGRoot) AppendChild(child Tag)
- func (t *SVGRoot) Attributes() *tokens.StringDict
- func (t *SVGRoot) Children() []Tag
- func (t *SVGRoot) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *SVGRoot) Context() context.Context
- func (t *SVGRoot) DeleteAllChildren() error
- func (t *SVGRoot) DeleteChild(i int) error
- func (t *SVGRoot) EvalLazy() error
- func (t *SVGRoot) FinalParent() tokens.FinalTag
- func (t *SVGRoot) FoldDummy()
- func (t *SVGRoot) GetID() string
- func (t *SVGRoot) InsertChild(i int, child Tag) error
- func (t *SVGRoot) LaterSiblings() []Tag
- func (t *SVGRoot) Minify()
- func (t *SVGRoot) Name() string
- func (t *SVGRoot) NumChildren() int
- func (t *SVGRoot) Parent() Tag
- func (t *SVGRoot) RegisterParent(p Tag)
- func (t *SVGRoot) SetID(id string)
- func (t *SVGRoot) Siblings() []Tag
- func (t *SVGRoot) Validate() error
- func (t *SVGRoot) ValidateChildren() error
- func (t *SVGRoot) VerifyElementCount(i int, ecKey string) error
- func (t *SVGRoot) Write(indent string, nl string, tab string) string
- type SVGTag
- type SVGTagData
- func (t *SVGTagData) AppendChild(child Tag)
- func (t *SVGTagData) Attributes() *tokens.StringDict
- func (t *SVGTagData) Children() []Tag
- func (t *SVGTagData) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *SVGTagData) Compress(vb SVGViewBox)
- func (t *SVGTagData) Context() context.Context
- func (t *SVGTagData) DeleteAllChildren() error
- func (t *SVGTagData) DeleteChild(i int) error
- func (t *SVGTagData) EvalLazy() error
- func (t *SVGTagData) FinalParent() tokens.FinalTag
- func (t *SVGTagData) FoldDummy()
- func (t *SVGTagData) GetID() string
- func (t *SVGTagData) InsertChild(i int, child Tag) error
- func (t *SVGTagData) LaterSiblings() []Tag
- func (t *SVGTagData) Minify() bool
- func (t *SVGTagData) Name() string
- func (t *SVGTagData) NumChildren() int
- func (t *SVGTagData) Parent() Tag
- func (t *SVGTagData) RegisterParent(p Tag)
- func (t *SVGTagData) SetID(id string)
- func (t *SVGTagData) Siblings() []Tag
- func (t *SVGTagData) Validate() error
- func (t *SVGTagData) ValidateChildren() error
- func (t *SVGTagData) VerifyElementCount(i int, ecKey string) error
- type SVGViewBox
- type SVGViewBoxData
- func (vb *SVGViewBoxData) CompressDX(dx float64) float64
- func (vb *SVGViewBoxData) CompressDXDY(dx float64, dy float64) (float64, float64)
- func (vb *SVGViewBoxData) CompressDY(dy float64) float64
- func (vb *SVGViewBoxData) CompressScalar(s float64) float64
- func (vb *SVGViewBoxData) CompressSelf() string
- func (vb *SVGViewBoxData) CompressX(x float64) float64
- func (vb *SVGViewBoxData) CompressXY(x float64, y float64) (float64, float64)
- func (vb *SVGViewBoxData) CompressY(y float64) float64
- type Script
- type SrcScript
- type Style
- func (t *Style) AppendChild(child Tag)
- func (t *Style) Attributes() *tokens.StringDict
- func (t *Style) Children() []Tag
- func (t *Style) CollectIDs(IDMap) error
- func (t *Style) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Style) Compress(vb SVGViewBox)
- func (t *Style) Context() context.Context
- func (t *Style) DeleteAllChildren() error
- func (t *Style) DeleteChild(i int) error
- func (t *Style) EvalLazy() error
- func (t *Style) FinalParent() tokens.FinalTag
- func (t *Style) FoldDummy()
- func (t *Style) GetID() string
- func (t *Style) InsertChild(i int, child Tag) error
- func (t *Style) LaterSiblings() []Tag
- func (t *Style) Minify() bool
- func (t *Style) Name() string
- func (t *Style) NumChildren() int
- func (t *Style) Parent() Tag
- func (t *Style) RegisterParent(p Tag)
- func (t *Style) SetID(id string)
- func (t *Style) Siblings() []Tag
- func (t *Style) Validate() error
- func (t *Style) ValidateChildren() error
- func (t *Style) VerifyElementCount(i int, ecKey string) error
- func (t *Style) Write(indent string, nl, tab string) string
- type TOC
- func (t *TOC) AppendChild(child Tag)
- func (t *TOC) Attributes() *tokens.StringDict
- func (t *TOC) Children() []Tag
- func (t *TOC) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *TOC) Context() context.Context
- func (t *TOC) DeleteAllChildren() error
- func (t *TOC) DeleteChild(i int) error
- func (t *TOC) EvalLazy() error
- func (t *TOC) FinalParent() tokens.FinalTag
- func (t *TOC) FoldDummy()
- func (t *TOC) GetID() string
- func (t *TOC) InsertChild(i int, child Tag) error
- func (t *TOC) LaterSiblings() []Tag
- func (t *TOC) Name() string
- func (t *TOC) NumChildren() int
- func (t *TOC) Parent() Tag
- func (t *TOC) RegisterParent(p Tag)
- func (t *TOC) SetID(id string)
- func (t *TOC) Siblings() []Tag
- func (t *TOC) Validate() error
- func (t *TOC) ValidateChildren() error
- func (t *TOC) VerifyElementCount(i int, ecKey string) error
- type TOCNumbering
- type Tag
- func BuildTag(key string, attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func Copy(tag_ Tag, ctx context.Context) Tag
- func NewBody(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewBr(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewDiv(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewDocType(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewDummy(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewGeneric(key string, attr *tokens.StringDict, inline bool, ctx context.Context) (Tag, error)
- func NewHTML(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewHead(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewImg(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewInput(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewLink(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewMeta(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewSVG(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewScript(attr *tokens.StringDict, content string, ctx context.Context) (Tag, error)
- func NewStyle(attr *tokens.StringDict, content string, ctx context.Context) (Tag, error)
- func NewStyleSheetLink(relPath string, ctx context.Context) (Tag, error)
- func NewTOC(numbering string, attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewTitle(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- func NewXMLHeader(attr *tokens.StringDict, ctx context.Context) (Tag, error)
- type TagBuilder
- type Text
- type Title
- func (t *Title) AppendChild(child Tag)
- func (t *Title) Attributes() *tokens.StringDict
- func (t *Title) Children() []Tag
- func (t *Title) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *Title) Context() context.Context
- func (t *Title) DeleteAllChildren() error
- func (t *Title) DeleteChild(i int) error
- func (t *Title) EvalLazy() error
- func (t *Title) FinalParent() tokens.FinalTag
- func (t *Title) FoldDummy()
- func (t *Title) GetID() string
- func (t *Title) InsertChild(i int, child Tag) error
- func (t *Title) LaterSiblings() []Tag
- func (t *Title) Name() string
- func (t *Title) NumChildren() int
- func (t *Title) Parent() Tag
- func (t *Title) RegisterParent(p Tag)
- func (t *Title) SetID(id string)
- func (t *Title) Siblings() []Tag
- func (t *Title) Validate() error
- func (t *Title) ValidateChildren() error
- func (t *Title) VerifyElementCount(i int, ecKey string) error
- func (t *Title) Write(indent string, nl, tab string) string
- type VisibleTag
- type VisibleTagData
- func (t *VisibleTagData) AppendChild(child Tag)
- func (t *VisibleTagData) Attributes() *tokens.StringDict
- func (t *VisibleTagData) Children() []Tag
- func (t *VisibleTagData) CollectIDs(idMap IDMap) error
- func (t *VisibleTagData) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *VisibleTagData) Context() context.Context
- func (t *VisibleTagData) DeleteAllChildren() error
- func (t *VisibleTagData) DeleteChild(i int) error
- func (t *VisibleTagData) EvalLazy() error
- func (t *VisibleTagData) FinalParent() tokens.FinalTag
- func (t *VisibleTagData) FoldDummy()
- func (t *VisibleTagData) GetClasses() []string
- func (t *VisibleTagData) GetID() string
- func (t *VisibleTagData) InnerHTML() string
- func (t *VisibleTagData) InsertChild(i int, child Tag) error
- func (t *VisibleTagData) LaterSiblings() []Tag
- func (t *VisibleTagData) Name() string
- func (t *VisibleTagData) NumChildren() int
- func (t *VisibleTagData) Parent() Tag
- func (t *VisibleTagData) RegisterParent(p Tag)
- func (t *VisibleTagData) RemoveTmpAttribute(key string)
- func (t *VisibleTagData) SetClasses(c []string)
- func (t *VisibleTagData) SetID(id string)
- func (t *VisibleTagData) SetTmpAttribute(key string, valueToken tokens.Token)
- func (t *VisibleTagData) Siblings() []Tag
- func (t *VisibleTagData) ToJSType() string
- func (t *VisibleTagData) Validate() error
- func (t *VisibleTagData) ValidateChildren() error
- func (t *VisibleTagData) VerifyElementCount(i int, ecKey string) error
- func (t *VisibleTagData) Write(indent string, nl, tab string) string
- func (t *VisibleTagData) WriteWrappedAutoHref(indent string, nl, tab string) string
- type XMLHeader
- func (t *XMLHeader) AppendChild(child Tag)
- func (t *XMLHeader) Attributes() *tokens.StringDict
- func (t *XMLHeader) Children() []Tag
- func (t *XMLHeader) CollectScripts(bundle *scripts.InlineBundle) error
- func (t *XMLHeader) Context() context.Context
- func (t *XMLHeader) DeleteAllChildren() error
- func (t *XMLHeader) DeleteChild(i int) error
- func (t *XMLHeader) EvalLazy() error
- func (t *XMLHeader) FinalParent() tokens.FinalTag
- func (t *XMLHeader) FoldDummy()
- func (t *XMLHeader) GetID() string
- func (t *XMLHeader) InsertChild(i int, child Tag) error
- func (t *XMLHeader) LaterSiblings() []Tag
- func (t *XMLHeader) Name() string
- func (t *XMLHeader) NumChildren() int
- func (t *XMLHeader) Parent() Tag
- func (t *XMLHeader) RegisterParent(p Tag)
- func (t *XMLHeader) SetID(id string)
- func (t *XMLHeader) Siblings() []Tag
- func (t *XMLHeader) Validate() error
- func (t *XMLHeader) ValidateChildren() error
- func (t *XMLHeader) VerifyElementCount(i int, ecKey string) error
- func (t *XMLHeader) Write(indent string, nl, tab string) string
Constants ¶
This section is empty.
Variables ¶
var ( INLINE = false COMPRESS_NUMBERS = false // always on AUTO_LINK = false // optimally convert tags containing 'href' attribute to <a> VERBOSITY = 0 )
var ABS_PRECISION = 5
var AUTO_DOC_TYPE = true
var GEN_PRECISION = 3 // == -math.Log10(0.001)
var REL_PRECISION = 7
wrt the viewBox
Functions ¶
func AssertUniqueID ¶
func NewUniqueClass ¶ added in v0.4.0
func NewUniqueClass() string
func NewUniqueID ¶ added in v0.4.0
func NewUniqueID() string
func RegisterParents ¶
func RegisterParents(root Tag)
Types ¶
type Body ¶
type Body struct {
VisibleTagData
}
func (*Body) AppendChild ¶
func (t *Body) AppendChild(child Tag)
func (*Body) Attributes ¶
func (t *Body) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Body) CollectIDs ¶
func (*Body) CollectScripts ¶
func (t *Body) CollectScripts(bundle *scripts.InlineBundle) error
func (*Body) DeleteAllChildren ¶
func (t *Body) DeleteAllChildren() error
func (*Body) DeleteChild ¶
func (*Body) FinalParent ¶ added in v0.2.0
func (*Body) InsertChild ¶
func (*Body) LaterSiblings ¶ added in v0.4.0
func (t *Body) LaterSiblings() []Tag
func (*Body) NumChildren ¶
func (t *Body) NumChildren() int
func (*Body) RegisterParent ¶
func (t *Body) RegisterParent(p Tag)
func (*Body) ValidateChildren ¶
func (t *Body) ValidateChildren() error
func (*Body) VerifyElementCount ¶
type Br ¶
type Br struct {
VisibleTagData
}
func (*Br) AppendChild ¶
func (t *Br) AppendChild(child Tag)
func (*Br) Attributes ¶
func (t *Br) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Br) CollectScripts ¶
func (t *Br) CollectScripts(bundle *scripts.InlineBundle) error
func (*Br) DeleteAllChildren ¶
func (t *Br) DeleteAllChildren() error
func (*Br) DeleteChild ¶
func (*Br) FinalParent ¶ added in v0.2.0
func (*Br) InsertChild ¶
func (*Br) LaterSiblings ¶ added in v0.4.0
func (t *Br) LaterSiblings() []Tag
func (*Br) NumChildren ¶
func (t *Br) NumChildren() int
func (*Br) RegisterParent ¶
func (t *Br) RegisterParent(p Tag)
func (*Br) ValidateChildren ¶
func (t *Br) ValidateChildren() error
func (*Br) VerifyElementCount ¶
type ClassMap ¶
type ClassMap interface { HasTag(class string) bool GetTag(class string) []VisibleTag AppendTag(class string, t VisibleTag) HasScriptClass(class string) bool }
func NewClassMap ¶
func NewClassMap() ClassMap
type ClassMapData ¶
type ClassMapData struct {
// contains filtered or unexported fields
}
func (*ClassMapData) AppendTag ¶
func (m *ClassMapData) AppendTag(class string, t VisibleTag)
func (*ClassMapData) GetTag ¶
func (m *ClassMapData) GetTag(class string) []VisibleTag
func (*ClassMapData) HasScriptClass ¶
func (m *ClassMapData) HasScriptClass(class string) bool
func (*ClassMapData) HasTag ¶
func (m *ClassMapData) HasTag(class string) bool
type Div ¶
type Div struct {
VisibleTagData
}
func (*Div) AppendChild ¶
func (t *Div) AppendChild(child Tag)
func (*Div) Attributes ¶
func (t *Div) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Div) CollectScripts ¶
func (t *Div) CollectScripts(bundle *scripts.InlineBundle) error
func (*Div) DeleteAllChildren ¶
func (t *Div) DeleteAllChildren() error
func (*Div) DeleteChild ¶
func (*Div) FinalParent ¶ added in v0.2.0
func (*Div) InsertChild ¶
func (*Div) LaterSiblings ¶ added in v0.4.0
func (t *Div) LaterSiblings() []Tag
func (*Div) NumChildren ¶
func (t *Div) NumChildren() int
func (*Div) RegisterParent ¶
func (t *Div) RegisterParent(p Tag)
func (*Div) ValidateChildren ¶
func (t *Div) ValidateChildren() error
func (*Div) VerifyElementCount ¶
type DocType ¶
type DocType struct {
// contains filtered or unexported fields
}
func NewAutoDocType ¶
func NewAutoDocType() *DocType
func (*DocType) AppendChild ¶
func (t *DocType) AppendChild(child Tag)
func (*DocType) Attributes ¶
func (t *DocType) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*DocType) CollectScripts ¶
func (t *DocType) CollectScripts(bundle *scripts.InlineBundle) error
func (*DocType) DeleteAllChildren ¶
func (t *DocType) DeleteAllChildren() error
func (*DocType) DeleteChild ¶
func (*DocType) FinalParent ¶ added in v0.2.0
func (*DocType) InsertChild ¶
func (*DocType) LaterSiblings ¶ added in v0.4.0
func (t *DocType) LaterSiblings() []Tag
func (*DocType) NumChildren ¶
func (t *DocType) NumChildren() int
func (*DocType) RegisterParent ¶
func (t *DocType) RegisterParent(p Tag)
func (*DocType) ValidateChildren ¶
func (t *DocType) ValidateChildren() error
func (*DocType) VerifyElementCount ¶
type Dummy ¶
type Dummy struct {
// contains filtered or unexported fields
}
func (*Dummy) AppendChild ¶
func (t *Dummy) AppendChild(child Tag)
func (*Dummy) Attributes ¶
func (t *Dummy) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Dummy) CollectScripts ¶
func (t *Dummy) CollectScripts(bundle *scripts.InlineBundle) error
func (*Dummy) Compress ¶
func (t *Dummy) Compress(vb SVGViewBox)
func (*Dummy) DeleteAllChildren ¶
func (t *Dummy) DeleteAllChildren() error
func (*Dummy) DeleteChild ¶
func (*Dummy) FinalParent ¶ added in v0.2.0
func (*Dummy) InsertChild ¶
func (*Dummy) LaterSiblings ¶ added in v0.4.0
func (t *Dummy) LaterSiblings() []Tag
func (*Dummy) NumChildren ¶
func (t *Dummy) NumChildren() int
func (*Dummy) RegisterParent ¶
func (t *Dummy) RegisterParent(p Tag)
func (*Dummy) ValidateChildren ¶
func (t *Dummy) ValidateChildren() error
func (*Dummy) VerifyElementCount ¶
type GenBuilder ¶
type GenBuilder struct {
// contains filtered or unexported fields
}
func (*GenBuilder) Build ¶
func (b *GenBuilder) Build(key string, attr *tokens.StringDict, ctx context.Context) (Tag, error)
generic
type Generic ¶
type Generic struct { VisibleTagData // contains filtered or unexported fields }
func (*Generic) AppendChild ¶
func (t *Generic) AppendChild(child Tag)
func (*Generic) Attributes ¶
func (t *Generic) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Generic) CollectScripts ¶
func (t *Generic) CollectScripts(bundle *scripts.InlineBundle) error
func (*Generic) DeleteAllChildren ¶
func (t *Generic) DeleteAllChildren() error
func (*Generic) DeleteChild ¶
func (*Generic) FinalParent ¶ added in v0.2.0
func (*Generic) InsertChild ¶
func (*Generic) LaterSiblings ¶ added in v0.4.0
func (t *Generic) LaterSiblings() []Tag
func (*Generic) NumChildren ¶
func (t *Generic) NumChildren() int
func (*Generic) RegisterParent ¶
func (t *Generic) RegisterParent(p Tag)
func (*Generic) ValidateChildren ¶
func (t *Generic) ValidateChildren() error
func (*Generic) VerifyElementCount ¶
type HTML ¶
type HTML struct {
// contains filtered or unexported fields
}
func (*HTML) AppendChild ¶
func (t *HTML) AppendChild(child Tag)
func (*HTML) Attributes ¶
func (t *HTML) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*HTML) CollectIDs ¶
func (*HTML) CollectScripts ¶
func (t *HTML) CollectScripts(bundle *scripts.InlineBundle) error
func (*HTML) DeleteAllChildren ¶
func (t *HTML) DeleteAllChildren() error
func (*HTML) DeleteChild ¶
func (*HTML) FinalParent ¶ added in v0.2.0
func (*HTML) GetClasses ¶
func (*HTML) IncludeControl ¶
func (*HTML) IncludeStyle ¶
func (*HTML) InsertChild ¶
func (*HTML) LaterSiblings ¶ added in v0.4.0
func (t *HTML) LaterSiblings() []Tag
func (*HTML) NumChildren ¶
func (t *HTML) NumChildren() int
func (*HTML) RegisterParent ¶
func (t *HTML) RegisterParent(p Tag)
func (*HTML) SetClasses ¶
func (*HTML) SetStyleURL ¶ added in v0.4.0
func (*HTML) ValidateChildren ¶
func (t *HTML) ValidateChildren() error
func (*HTML) VerifyElementCount ¶
type Head ¶
type Head struct {
// contains filtered or unexported fields
}
func (*Head) AppendChild ¶
func (t *Head) AppendChild(child Tag)
func (*Head) Attributes ¶
func (t *Head) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Head) CollectScripts ¶
func (t *Head) CollectScripts(bundle *scripts.InlineBundle) error
func (*Head) DeleteAllChildren ¶
func (t *Head) DeleteAllChildren() error
func (*Head) DeleteChild ¶
func (*Head) FinalParent ¶ added in v0.2.0
func (*Head) InsertChild ¶
func (*Head) LaterSiblings ¶ added in v0.4.0
func (t *Head) LaterSiblings() []Tag
func (*Head) NumChildren ¶
func (t *Head) NumChildren() int
func (*Head) RegisterParent ¶
func (t *Head) RegisterParent(p Tag)
func (*Head) ValidateChildren ¶
func (t *Head) ValidateChildren() error
func (*Head) VerifyElementCount ¶
type IDMap ¶
type IDMapTag ¶
type IDMapTag interface { Name() string ToJSType() string InnerHTML() string // empty if no direct descendant is text Context() context.Context }
only requires a subset of that tag methods
type Img ¶
type Img struct {
VisibleTagData
}
func (*Img) AppendChild ¶
func (t *Img) AppendChild(child Tag)
func (*Img) Attributes ¶
func (t *Img) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Img) CollectScripts ¶
func (t *Img) CollectScripts(bundle *scripts.InlineBundle) error
func (*Img) DeleteAllChildren ¶
func (t *Img) DeleteAllChildren() error
func (*Img) DeleteChild ¶
func (*Img) FinalParent ¶ added in v0.2.0
func (*Img) InsertChild ¶
func (*Img) LaterSiblings ¶ added in v0.4.0
func (t *Img) LaterSiblings() []Tag
func (*Img) NumChildren ¶
func (t *Img) NumChildren() int
func (*Img) RegisterParent ¶
func (t *Img) RegisterParent(p Tag)
func (*Img) ValidateChildren ¶
func (t *Img) ValidateChildren() error
func (*Img) VerifyElementCount ¶
type Input ¶
type Input struct {
VisibleTagData
}
func (*Input) AppendChild ¶
func (t *Input) AppendChild(child Tag)
func (*Input) Attributes ¶
func (t *Input) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Input) CollectScripts ¶
func (t *Input) CollectScripts(bundle *scripts.InlineBundle) error
func (*Input) DeleteAllChildren ¶
func (t *Input) DeleteAllChildren() error
func (*Input) DeleteChild ¶
func (*Input) FinalParent ¶ added in v0.2.0
func (*Input) InsertChild ¶
func (*Input) LaterSiblings ¶ added in v0.4.0
func (t *Input) LaterSiblings() []Tag
func (*Input) NumChildren ¶
func (t *Input) NumChildren() int
func (*Input) RegisterParent ¶
func (t *Input) RegisterParent(p Tag)
func (*Input) ValidateChildren ¶
func (t *Input) ValidateChildren() error
func (*Input) VerifyElementCount ¶
type LeafTag ¶
type LeafTag struct {
// contains filtered or unexported fields
}
implements Tag interface
func NewLeafTag ¶
func (*LeafTag) AppendChild ¶
func (*LeafTag) Attributes ¶
func (t *LeafTag) Attributes() *tokens.StringDict
func (*LeafTag) CollectIDs ¶
func (*LeafTag) CollectScripts ¶
func (t *LeafTag) CollectScripts(bundle *scripts.InlineBundle) error
func (*LeafTag) DeleteAllChildren ¶
func (*LeafTag) DeleteChild ¶
func (*LeafTag) FinalParent ¶ added in v0.2.0
func (*LeafTag) GetClasses ¶
func (*LeafTag) LaterSiblings ¶ added in v0.4.0
func (*LeafTag) NumChildren ¶
func (*LeafTag) RegisterParent ¶
func (*LeafTag) SetClasses ¶
func (*LeafTag) VerifyElementCount ¶
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
func (*Link) AppendChild ¶
func (t *Link) AppendChild(child Tag)
func (*Link) Attributes ¶
func (t *Link) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Link) CollectScripts ¶
func (t *Link) CollectScripts(bundle *scripts.InlineBundle) error
func (*Link) DeleteAllChildren ¶
func (t *Link) DeleteAllChildren() error
func (*Link) DeleteChild ¶
func (*Link) FinalParent ¶ added in v0.2.0
func (*Link) InsertChild ¶
func (*Link) LaterSiblings ¶ added in v0.4.0
func (t *Link) LaterSiblings() []Tag
func (*Link) NumChildren ¶
func (t *Link) NumChildren() int
func (*Link) RegisterParent ¶
func (t *Link) RegisterParent(p Tag)
func (*Link) ValidateChildren ¶
func (t *Link) ValidateChildren() error
func (*Link) VerifyElementCount ¶
type LoaderScript ¶
type LoaderScript struct { LeafTag // contains filtered or unexported fields }
func NewLoaderScript ¶
func NewLoaderScript(content string, ctx context.Context) (*LoaderScript, error)
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
func (*Meta) AppendChild ¶
func (t *Meta) AppendChild(child Tag)
func (*Meta) Attributes ¶
func (t *Meta) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Meta) CollectScripts ¶
func (t *Meta) CollectScripts(bundle *scripts.InlineBundle) error
func (*Meta) DeleteAllChildren ¶
func (t *Meta) DeleteAllChildren() error
func (*Meta) DeleteChild ¶
func (*Meta) FinalParent ¶ added in v0.2.0
func (*Meta) InsertChild ¶
func (*Meta) LaterSiblings ¶ added in v0.4.0
func (t *Meta) LaterSiblings() []Tag
func (*Meta) NumChildren ¶
func (t *Meta) NumChildren() int
func (*Meta) RegisterParent ¶
func (t *Meta) RegisterParent(p Tag)
func (*Meta) ValidateChildren ¶
func (t *Meta) ValidateChildren() error
func (*Meta) VerifyElementCount ¶
type NoChildrenBuilder ¶
type NoChildrenBuilder struct { }
func (*NoChildrenBuilder) Build ¶
func (b *NoChildrenBuilder) Build(key string, attr *tokens.StringDict, ctx context.Context) (Tag, error)
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
doesn't need to implement Tag interface TODO: maybe it is more convenient if it DOES implement the Tag interface
func (*Root) AppendChild ¶
func (t *Root) AppendChild(child Tag)
func (*Root) Attributes ¶
func (t *Root) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Root) CollectIDs ¶
func (*Root) CollectScripts ¶
func (t *Root) CollectScripts(bundle *scripts.InlineBundle) error
dummy is just to respect the interface
func (*Root) DeleteAllChildren ¶
func (t *Root) DeleteAllChildren() error
func (*Root) DeleteChild ¶
func (*Root) FinalParent ¶ added in v0.2.0
func (*Root) GetDocTypeAndHTML ¶ added in v0.4.0
func (*Root) IncludeControl ¶
func (*Root) IncludeStyle ¶
func (*Root) InsertChild ¶
func (*Root) LaterSiblings ¶ added in v0.4.0
func (t *Root) LaterSiblings() []Tag
func (*Root) NumChildren ¶
func (t *Root) NumChildren() int
func (*Root) RegisterParent ¶
func (t *Root) RegisterParent(p Tag)
func (*Root) SetStyleURL ¶ added in v0.4.0
returns the globally bundleable styles
func (*Root) ValidateChildren ¶
func (t *Root) ValidateChildren() error
type SVG ¶
type SVG struct {
VisibleTagData
}
func (*SVG) AppendChild ¶
func (t *SVG) AppendChild(child Tag)
func (*SVG) Attributes ¶
func (t *SVG) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*SVG) CollectScripts ¶
func (t *SVG) CollectScripts(bundle *scripts.InlineBundle) error
func (*SVG) Compress ¶
func (t *SVG) Compress(vb SVGViewBox)
func (*SVG) DeleteAllChildren ¶
func (t *SVG) DeleteAllChildren() error
func (*SVG) DeleteChild ¶
func (*SVG) FinalParent ¶ added in v0.2.0
func (*SVG) InsertChild ¶
func (*SVG) LaterSiblings ¶ added in v0.4.0
func (t *SVG) LaterSiblings() []Tag
func (*SVG) NumChildren ¶
func (t *SVG) NumChildren() int
func (*SVG) RegisterParent ¶
func (t *SVG) RegisterParent(p Tag)
func (*SVG) ValidateChildren ¶
func (t *SVG) ValidateChildren() error
func (*SVG) VerifyElementCount ¶
type SVGRoot ¶
type SVGRoot struct {
// contains filtered or unexported fields
}
func NewSVGRoot ¶
func (*SVGRoot) AppendChild ¶
func (t *SVGRoot) AppendChild(child Tag)
func (*SVGRoot) Attributes ¶
func (t *SVGRoot) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*SVGRoot) CollectScripts ¶
func (t *SVGRoot) CollectScripts(bundle *scripts.InlineBundle) error
func (*SVGRoot) DeleteAllChildren ¶
func (t *SVGRoot) DeleteAllChildren() error
func (*SVGRoot) DeleteChild ¶
func (*SVGRoot) FinalParent ¶ added in v0.2.0
func (*SVGRoot) InsertChild ¶
func (*SVGRoot) LaterSiblings ¶ added in v0.4.0
func (t *SVGRoot) LaterSiblings() []Tag
func (*SVGRoot) NumChildren ¶
func (t *SVGRoot) NumChildren() int
func (*SVGRoot) RegisterParent ¶
func (t *SVGRoot) RegisterParent(p Tag)
func (*SVGRoot) ValidateChildren ¶
func (t *SVGRoot) ValidateChildren() error
func (*SVGRoot) VerifyElementCount ¶
type SVGTag ¶
type SVGTag interface { Tag // TODO: take g transforms into account when going down the tree Compress(vb SVGViewBox) // returns true if can be removed Minify() bool // for svg documents created by drawing programs }
func NewSVGDummy ¶
type SVGTagData ¶
type SVGTagData struct {
VisibleTagData
}
func NewSVGTagData ¶
func NewSVGTagData(name string, attr *tokens.StringDict, ctx context.Context) (SVGTagData, error)
func (*SVGTagData) AppendChild ¶
func (t *SVGTagData) AppendChild(child Tag)
func (*SVGTagData) Attributes ¶
func (t *SVGTagData) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*SVGTagData) CollectScripts ¶
func (t *SVGTagData) CollectScripts(bundle *scripts.InlineBundle) error
func (*SVGTagData) Compress ¶
func (t *SVGTagData) Compress(vb SVGViewBox)
func (*SVGTagData) DeleteAllChildren ¶
func (t *SVGTagData) DeleteAllChildren() error
func (*SVGTagData) DeleteChild ¶
func (*SVGTagData) FinalParent ¶ added in v0.2.0
func (*SVGTagData) InsertChild ¶
func (*SVGTagData) LaterSiblings ¶ added in v0.4.0
func (t *SVGTagData) LaterSiblings() []Tag
func (*SVGTagData) Minify ¶
func (t *SVGTagData) Minify() bool
func (*SVGTagData) NumChildren ¶
func (t *SVGTagData) NumChildren() int
func (*SVGTagData) RegisterParent ¶
func (t *SVGTagData) RegisterParent(p Tag)
func (*SVGTagData) Validate ¶
func (t *SVGTagData) Validate() error
func (*SVGTagData) ValidateChildren ¶
func (t *SVGTagData) ValidateChildren() error
func (*SVGTagData) VerifyElementCount ¶
type SVGViewBox ¶
type SVGViewBox interface { CompressXY(x float64, y float64) (float64, float64) CompressX(x float64) float64 CompressY(y float64) float64 CompressDXDY(dx float64, dy float64) (float64, float64) CompressDX(dx float64) float64 CompressDY(dy float64) float64 CompressScalar(s float64) float64 CompressSelf() string }
func NewViewBoxFromString ¶
func NewViewBoxFromString(s string, ctx context.Context) (SVGViewBox, error)
type SVGViewBoxData ¶
type SVGViewBoxData struct {
// contains filtered or unexported fields
}
func (*SVGViewBoxData) CompressDX ¶
func (vb *SVGViewBoxData) CompressDX(dx float64) float64
func (*SVGViewBoxData) CompressDXDY ¶
func (vb *SVGViewBoxData) CompressDXDY(dx float64, dy float64) (float64, float64)
func (*SVGViewBoxData) CompressDY ¶
func (vb *SVGViewBoxData) CompressDY(dy float64) float64
func (*SVGViewBoxData) CompressScalar ¶
func (vb *SVGViewBoxData) CompressScalar(s float64) float64
func (*SVGViewBoxData) CompressSelf ¶
func (vb *SVGViewBoxData) CompressSelf() string
func (*SVGViewBoxData) CompressX ¶
func (vb *SVGViewBoxData) CompressX(x float64) float64
func (*SVGViewBoxData) CompressXY ¶
func (vb *SVGViewBoxData) CompressXY(x float64, y float64) (float64, float64)
func (*SVGViewBoxData) CompressY ¶
func (vb *SVGViewBoxData) CompressY(y float64) float64
type Script ¶
type Script struct { LeafTag // contains filtered or unexported fields }
reuse tagData's write functions
func (*Script) CollectScripts ¶
func (t *Script) CollectScripts(bundle *scripts.InlineBundle) error
type Style ¶
type Style struct {
// contains filtered or unexported fields
}
func (*Style) AppendChild ¶
func (*Style) Attributes ¶
func (t *Style) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Style) CollectIDs ¶
func (*Style) CollectScripts ¶
func (t *Style) CollectScripts(bundle *scripts.InlineBundle) error
func (*Style) DeleteAllChildren ¶
func (*Style) DeleteChild ¶
func (*Style) FinalParent ¶ added in v0.2.0
func (*Style) LaterSiblings ¶ added in v0.4.0
func (t *Style) LaterSiblings() []Tag
func (*Style) NumChildren ¶
func (*Style) RegisterParent ¶
func (t *Style) RegisterParent(p Tag)
func (*Style) ValidateChildren ¶
func (t *Style) ValidateChildren() error
func (*Style) VerifyElementCount ¶
type TOC ¶ added in v0.2.0
type TOC struct { VisibleTagData // contains filtered or unexported fields }
func (*TOC) AppendChild ¶ added in v0.2.0
func (t *TOC) AppendChild(child Tag)
func (*TOC) Attributes ¶ added in v0.2.0
func (t *TOC) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*TOC) CollectScripts ¶ added in v0.2.0
func (t *TOC) CollectScripts(bundle *scripts.InlineBundle) error
func (*TOC) DeleteAllChildren ¶ added in v0.2.0
func (t *TOC) DeleteAllChildren() error
func (*TOC) DeleteChild ¶ added in v0.2.0
func (*TOC) FinalParent ¶ added in v0.2.0
func (*TOC) InsertChild ¶ added in v0.2.0
func (*TOC) LaterSiblings ¶ added in v0.4.0
func (t *TOC) LaterSiblings() []Tag
func (*TOC) NumChildren ¶ added in v0.2.0
func (t *TOC) NumChildren() int
func (*TOC) RegisterParent ¶ added in v0.2.0
func (t *TOC) RegisterParent(p Tag)
func (*TOC) ValidateChildren ¶ added in v0.2.0
func (t *TOC) ValidateChildren() error
func (*TOC) VerifyElementCount ¶ added in v0.2.0
type TOCNumbering ¶ added in v0.2.0
type TOCNumbering struct {
// contains filtered or unexported fields
}
func NewTOCNumbering ¶ added in v0.2.0
func NewTOCNumbering() *TOCNumbering
func (*TOCNumbering) CreateTag ¶ added in v0.2.0
func (n *TOCNumbering) CreateTag(scheme string, ctx context.Context) Tag
func (*TOCNumbering) Next ¶ added in v0.2.0
func (n *TOCNumbering) Next(level int)
func (*TOCNumbering) Write ¶ added in v0.2.0
func (n *TOCNumbering) Write(scheme string) string
type Tag ¶
type Tag interface { Name() string Attributes() *tokens.StringDict NumChildren() int AppendChild(child Tag) InsertChild(i int, child Tag) error // original i is shifted right DeleteChild(i int) error DeleteAllChildren() error EvalLazy() error FoldDummy() VerifyElementCount(i int, ecKey string) error Children() []Tag Context() context.Context RegisterParent(Tag) // throws error if already set Parent() Tag FinalParent() tokens.FinalTag // exactly the same as Parent(), but just different interface Siblings() []Tag LaterSiblings() []Tag // tags that come after! CollectScripts(bundle *scripts.InlineBundle) error Validate() error Write(indent string, nl, tab string) string GetID() string SetID(id string) }
func NewDocType ¶
func NewGeneric ¶
func NewXMLHeader ¶
type TagBuilder ¶
type Text ¶
type Text struct { LeafTag // contains filtered or unexported fields }
func (*Text) Compress ¶
func (t *Text) Compress(vb SVGViewBox)
type Title ¶
type Title struct {
// contains filtered or unexported fields
}
func (*Title) AppendChild ¶
func (t *Title) AppendChild(child Tag)
func (*Title) Attributes ¶
func (t *Title) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*Title) CollectScripts ¶
func (t *Title) CollectScripts(bundle *scripts.InlineBundle) error
func (*Title) DeleteAllChildren ¶
func (t *Title) DeleteAllChildren() error
func (*Title) DeleteChild ¶
func (*Title) FinalParent ¶ added in v0.2.0
func (*Title) InsertChild ¶
func (*Title) LaterSiblings ¶ added in v0.4.0
func (t *Title) LaterSiblings() []Tag
func (*Title) NumChildren ¶
func (t *Title) NumChildren() int
func (*Title) RegisterParent ¶
func (t *Title) RegisterParent(p Tag)
func (*Title) ValidateChildren ¶
func (t *Title) ValidateChildren() error
func (*Title) VerifyElementCount ¶
type VisibleTag ¶
type VisibleTagData ¶
type VisibleTagData struct {
// contains filtered or unexported fields
}
func NewVisibleTag ¶
func NewVisibleTag(name string, selfClosing bool, attr *tokens.StringDict, ctx context.Context) (VisibleTagData, error)
func (*VisibleTagData) AppendChild ¶
func (t *VisibleTagData) AppendChild(child Tag)
func (*VisibleTagData) Attributes ¶
func (t *VisibleTagData) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*VisibleTagData) CollectIDs ¶
func (t *VisibleTagData) CollectIDs(idMap IDMap) error
func (*VisibleTagData) CollectScripts ¶
func (t *VisibleTagData) CollectScripts(bundle *scripts.InlineBundle) error
func (*VisibleTagData) DeleteAllChildren ¶
func (t *VisibleTagData) DeleteAllChildren() error
func (*VisibleTagData) DeleteChild ¶
func (*VisibleTagData) FinalParent ¶ added in v0.2.0
func (*VisibleTagData) GetClasses ¶
func (t *VisibleTagData) GetClasses() []string
func (*VisibleTagData) InnerHTML ¶
func (t *VisibleTagData) InnerHTML() string
func (*VisibleTagData) InsertChild ¶
func (*VisibleTagData) LaterSiblings ¶ added in v0.4.0
func (t *VisibleTagData) LaterSiblings() []Tag
func (*VisibleTagData) NumChildren ¶
func (t *VisibleTagData) NumChildren() int
func (*VisibleTagData) RegisterParent ¶
func (t *VisibleTagData) RegisterParent(p Tag)
func (*VisibleTagData) RemoveTmpAttribute ¶
func (t *VisibleTagData) RemoveTmpAttribute(key string)
func (*VisibleTagData) SetClasses ¶
func (t *VisibleTagData) SetClasses(c []string)
func (*VisibleTagData) SetTmpAttribute ¶
func (t *VisibleTagData) SetTmpAttribute(key string, valueToken tokens.Token)
func (*VisibleTagData) ToJSType ¶
func (t *VisibleTagData) ToJSType() string
func (*VisibleTagData) ValidateChildren ¶
func (t *VisibleTagData) ValidateChildren() error
func (*VisibleTagData) VerifyElementCount ¶
func (*VisibleTagData) WriteWrappedAutoHref ¶
func (t *VisibleTagData) WriteWrappedAutoHref(indent string, nl, tab string) string
type XMLHeader ¶
type XMLHeader struct {
// contains filtered or unexported fields
}
func (*XMLHeader) AppendChild ¶
func (t *XMLHeader) AppendChild(child Tag)
func (*XMLHeader) Attributes ¶
func (t *XMLHeader) Attributes() *tokens.StringDict
returns ptr, so attributes can be changed in-place
func (*XMLHeader) CollectScripts ¶
func (t *XMLHeader) CollectScripts(bundle *scripts.InlineBundle) error
func (*XMLHeader) DeleteAllChildren ¶
func (t *XMLHeader) DeleteAllChildren() error
func (*XMLHeader) DeleteChild ¶
func (*XMLHeader) FinalParent ¶ added in v0.2.0
func (*XMLHeader) InsertChild ¶
func (*XMLHeader) LaterSiblings ¶ added in v0.4.0
func (t *XMLHeader) LaterSiblings() []Tag
func (*XMLHeader) NumChildren ¶
func (t *XMLHeader) NumChildren() int
func (*XMLHeader) RegisterParent ¶
func (t *XMLHeader) RegisterParent(p Tag)
func (*XMLHeader) ValidateChildren ¶
func (t *XMLHeader) ValidateChildren() error
func (*XMLHeader) VerifyElementCount ¶
Source Files ¶
- Body.go
- Br.go
- ClassMap.go
- Div.go
- DocType.go
- Dummy.go
- Generic.go
- HTML.go
- Head.go
- IDMap.go
- Img.go
- Input.go
- LeafTag.go
- Link.go
- LoaderScript.go
- Meta.go
- Root.go
- SVG.go
- SVGRoot.go
- SVGTag.go
- SVGViewBox.go
- Script.go
- SrcScript.go
- Style.go
- TOC.go
- TOCNumbering.go
- Tag.go
- Text.go
- Title.go
- VisibleTag.go
- XMLHeader.go
- factory.go
- tree.go
- unique.go