Documentation
¶
Index ¶
- Constants
- type AnchorElm
- type Attributer
- type BodyElm
- type BrElm
- type ButtonElm
- type CSSRule
- type CSSRuleList
- type CSSStyleDecl
- type CSSStyleSheet
- type Constructor
- type CustomElemRegistry
- type DivElm
- type Document
- type Documentary
- type Elementary
- type Elm
- type ElmFactory
- type ElmOpt
- type ElmRegistry
- type EventTarger
- type FieldSetElm
- type FormElm
- type HeadElm
- type HeadingElm
- type HexColor
- type HrElm
- type HtmlElm
- type INode
- type ImgElementary
- type ImgElm
- type ImgOpt
- type InputElm
- type LabelElm
- type LegendElm
- type Node
- func (n *Node) AppendChild(nl ...INode) error
- func (n *Node) ChildNodes() NodeList
- func (n *Node) CloneNode(deep bool) INode
- func (n *Node) Contains(node INode) bool
- func (n *Node) GetRootNode() INode
- func (n *Node) HasChildNodes() bool
- func (n *Node) InsertBefore()
- func (n *Node) IsConnected() bool
- func (n *Node) IsDefaultNamespace() bool
- func (n *Node) IsEqualNode() bool
- func (n *Node) IsSameNode() bool
- func (n *Node) NextSibling() INode
- func (n *Node) NodeName() string
- func (n *Node) NodeValue() string
- func (n *Node) Normalize()
- func (n *Node) OwnerDocument() Documentary
- func (n *Node) PreviousSibling() INode
- func (n *Node) RemoveChild()
- func (n *Node) ReplaceChild()
- func (n *Node) SetOwnerDocument(doc Documentary) error
- func (n *Node) SetTextContent(content string)
- type NodeList
- type NodeOpt
- type NodeType
- type OptGroupElm
- type OptionElm
- type ParagraphElm
- type SelectElm
- type SpanElm
- type Text
- type Texter
- type UnknownElm
Constants ¶
View Source
const ( ErrorNode NodeType = 0 ElementNode = 1 AttributeNode = 2 TextNode = 3 CDATASectionNode = 4 ProcessingInstructionNode = 7 CommentNode = 8 DocumentNode = 9 DocumentTypeNode = 10 DocumentFragmentNode = 11 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorElm ¶
type AnchorElm struct {
*Elm
}
func (*AnchorElm) New ¶
func (e *AnchorElm) New(opts ...interface{}) Elementary
type Attributer ¶
type BodyElm ¶
type BodyElm struct {
*Elm
}
func (*BodyElm) New ¶
func (e *BodyElm) New(opts ...interface{}) Elementary
type BrElm ¶
type BrElm struct {
*Elm
}
func (*BrElm) New ¶
func (e *BrElm) New(opts ...interface{}) Elementary
type ButtonElm ¶
type ButtonElm struct {
*Elm
}
func (*ButtonElm) New ¶
func (e *ButtonElm) New(opts ...interface{}) Elementary
type CSSRuleList ¶
type CSSRuleList []CSSRule
type CSSStyleDecl ¶
type CSSStyleDecl struct { Text string // contains filtered or unexported fields }
func NewCSSStyleDecl ¶
func NewCSSStyleDecl(text string) CSSStyleDecl
func (CSSStyleDecl) GetPropertyValue ¶
func (s CSSStyleDecl) GetPropertyValue(name string) string
type CSSStyleSheet ¶
type CSSStyleSheet struct{}
type Constructor ¶
type Constructor interface {
New(...interface{}) Elementary
}
type CustomElemRegistry ¶
type CustomElemRegistry map[string]Elementary
CustomElmRegistry is runtime regiter custom elemenent
type DivElm ¶
type DivElm struct {
*Elm
}
func (*DivElm) New ¶
func (e *DivElm) New(opts ...interface{}) Elementary
type Document ¶
type Document struct { *Node ActiveElement Elm AlinkColor HexColor Body Elm ChildElementCount int // contains filtered or unexported fields }
func NewDocument ¶
func NewDocument() *Document
func (*Document) CreateElement ¶
func (d *Document) CreateElement(tag string, opts ...interface{}) (Elementary, error)
type Documentary ¶
type Elementary ¶
type Elm ¶
type Elm struct { *Node // contains filtered or unexported fields }
func (*Elm) SetInnerHTML ¶
@TODO: content must be decoder XML or HTML
func (*Elm) Style ¶
func (el *Elm) Style() CSSStyleDecl
type ElmFactory ¶
Factory method use to create new element
type EventTarger ¶
type EventTarger interface {
// contains filtered or unexported methods
}
type FieldSetElm ¶
type FieldSetElm struct {
*Elm
}
func (*FieldSetElm) New ¶
func (e *FieldSetElm) New(opts ...interface{}) Elementary
type FormElm ¶
type FormElm struct {
*Elm
}
func (*FormElm) New ¶
func (e *FormElm) New(opts ...interface{}) Elementary
type HeadElm ¶
type HeadElm struct {
*Elm
}
func (*HeadElm) New ¶
func (e *HeadElm) New(opts ...interface{}) Elementary
type HeadingElm ¶
type HeadingElm struct { *Elm // contains filtered or unexported fields }
func (*HeadingElm) New ¶
func (e *HeadingElm) New(opts ...interface{}) Elementary
type HrElm ¶
type HrElm struct {
*Elm
}
func (*HrElm) New ¶
func (e *HrElm) New(opts ...interface{}) Elementary
type HtmlElm ¶
type HtmlElm struct {
*Elm
}
func (*HtmlElm) New ¶
func (e *HtmlElm) New(opts ...interface{}) Elementary
type INode ¶
type INode interface { AppendChild(...INode) error CloneNode(bool) INode Contains(INode) bool GetRootNode() INode HasChildNodes() bool InsertBefore() IsDefaultNamespace() bool IsEqualNode() bool IsSameNode() bool Normalize() RemoveChild() ReplaceChild() /* Getters for properties */ ChildNodes() NodeList IsConnected() bool NextSibling() INode PreviousSibling() INode OwnerDocument() Documentary NodeName() string NodeValue() string /* Setter for properties */ SetOwnerDocument(Documentary) error SetTextContent(string) // contains filtered or unexported methods }
Interface port from DOM WebAPI https://developer.mozilla.org/en-US/docs/Web/API/Node Note: The line comment out means not implement yet
type ImgElementary ¶
type ImgElementary interface { Elementary Attributer Src() string Width() int Height() int }
type ImgElm ¶
type ImgElm struct { *Elm // contains filtered or unexported fields }
func (*ImgElm) New ¶
func (e *ImgElm) New(opts ...interface{}) Elementary
type InputElm ¶
type InputElm struct {
*Elm
}
func (*InputElm) New ¶
func (e *InputElm) New(opts ...interface{}) Elementary
type LabelElm ¶
type LabelElm struct {
*Elm
}
func (*LabelElm) New ¶
func (e *LabelElm) New(opts ...interface{}) Elementary
type LegendElm ¶
type LegendElm struct {
*Elm
}
func (*LegendElm) New ¶
func (e *LegendElm) New(opts ...interface{}) Elementary
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) AppendChild ¶
AppendChild() adds a node to the end of the children node. If the given child is a reference to an existing node in the document, appendChild() moves it from its current position to the new position.
func (*Node) ChildNodes ¶
ChildNodes return the Nodelist of children's node
func (*Node) GetRootNode ¶
func (*Node) HasChildNodes ¶
func (*Node) InsertBefore ¶
func (n *Node) InsertBefore()
func (*Node) IsConnected ¶
func (*Node) IsDefaultNamespace ¶
func (*Node) IsEqualNode ¶
func (*Node) IsSameNode ¶
func (*Node) NextSibling ¶
func (*Node) OwnerDocument ¶
func (n *Node) OwnerDocument() Documentary
func (*Node) PreviousSibling ¶
func (*Node) RemoveChild ¶
func (n *Node) RemoveChild()
func (*Node) ReplaceChild ¶
func (n *Node) ReplaceChild()
func (*Node) SetOwnerDocument ¶
func (n *Node) SetOwnerDocument(doc Documentary) error
func (*Node) SetTextContent ¶
type NodeOpt ¶
type NodeOpt func(*Node)
func WithNodeValue ¶
type OptGroupElm ¶
type OptGroupElm struct {
*Elm
}
func (*OptGroupElm) New ¶
func (e *OptGroupElm) New(opts ...interface{}) Elementary
type OptionElm ¶
type OptionElm struct {
*Elm
}
func (*OptionElm) New ¶
func (e *OptionElm) New(opts ...interface{}) Elementary
type ParagraphElm ¶
type ParagraphElm struct {
*Elm
}
func (*ParagraphElm) New ¶
func (e *ParagraphElm) New(opts ...interface{}) Elementary
type SelectElm ¶
type SelectElm struct {
*Elm
}
func (*SelectElm) New ¶
func (e *SelectElm) New(opts ...interface{}) Elementary
type SpanElm ¶
type SpanElm struct {
*Elm
}
func (*SpanElm) New ¶
func (e *SpanElm) New(opts ...interface{}) Elementary
type UnknownElm ¶
type UnknownElm struct {
*Elm
}
func (*UnknownElm) New ¶
func (e *UnknownElm) New(opts ...interface{}) Elementary
Source Files
¶
- css.go
- doc.go
- element.go
- elm_anchor.go
- elm_body.go
- elm_br.go
- elm_button.go
- elm_div.go
- elm_fieldset.go
- elm_form.go
- elm_head.go
- elm_heading.go
- elm_hr.go
- elm_html.go
- elm_img.go
- elm_input.go
- elm_label.go
- elm_legend.go
- elm_optgroup.go
- elm_option.go
- elm_paragraph.go
- elm_select.go
- elm_span.go
- elm_unknown.go
- event.go
- node.go
- text.go
- vui.go
Click to show internal directories.
Click to hide internal directories.