vec

package
v0.0.0-...-abfb1be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(h *HTML, m MarkupOrComponentOrHTML)

func Render

func Render(w io.Writer, c Component) error

func RenderHTML

func RenderHTML(w io.Writer, hs ...*HTML) error

Types

type Component

type Component interface {
	Render() *HTML
}

type HTML

type HTML struct {
	Type       html.NodeType // html.ElementNode or html.TextNode.
	DataAtom   atom.Atom     // Used when Type is html.ElementNode.
	Data       string        // Used when Type is html.TextNode.
	Attributes map[atom.Atom]string

	Children []*HTML
	HTMLNode *html.Node
}

type Markup

type Markup func(h *HTML)

type MarkupOrComponentOrHTML

type MarkupOrComponentOrHTML interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL