Documentation ¶
Index ¶
- Variables
- func IsPureTextContent(n Node) bool
- type Fan
- type Node
- func (n *Node) Ancestor(tag string) *Node
- func (n *Node) Attr(k string) string
- func (n *Node) CB() (blk *Node)
- func (n *Node) CBItems() (cbis []*Node)
- func (n Node) Content(pre bool) []string
- func (n Node) ContentString(pre bool) (t string)
- func (n Node) Data() string
- func (n *Node) Find(tag string) (c *Node)
- func (n *Node) FindAll(tag string) (cs []*Node)
- func (n *Node) FindNextPositions(position string) (ps []*Node)
- func (n *Node) HasAttr(k string) bool
- func (n *Node) IsContainingBlock(position string) bool
- func (n *Node) NumVClusters() (m int)
- func (n *Node) Parent() (p style.DomTree, ok bool)
- func (n *Node) Path() (p string, ok bool)
- func (n *Node) PrintTree()
- func (n *Node) Query(s string) (ns []*Node, err error)
- func (n *Node) QueryRef() string
- func (n *Node) Rect() image.Rectangle
- func (n *Node) Serialized() (string, error)
- func (n *Node) SetText(t string)
- func (n *Node) Style() style.Map
- func (n *Node) Traverse(f func(r int, c *Node))
- func (n Node) Type() html.NodeType
- func (n *Node) VSlice(i, j int) (s []*Node)
- type Rectangular
Constants ¶
This section is empty.
Variables ¶
View Source
var ContainingPositions = map[string]string{
"absolute": "relative",
}
Functions ¶
func IsPureTextContent ¶
Types ¶
type Node ¶
type Node struct { DomSubtree *html.Node `json:"-"` Text string Wrappable bool style.Map Rectangular Children []*Node // contains filtered or unexported fields }
func NewNodeTree ¶
func NewNodeTree(doc *html.Node, ps style.Map, nodeMap map[*html.Node]style.Map, parent *Node) (n *Node)
NewNodeTree propagates the cascading styles to the leaves
First applies the parent style and at the end the local style attribute's style is attached.
func (Node) ContentString ¶
func (*Node) FindNextPositions ¶
func (*Node) IsContainingBlock ¶
https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
func (*Node) NumVClusters ¶
func (*Node) Serialized ¶
type Rectangular ¶
Click to show internal directories.
Click to hide internal directories.