types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute func(attrs map[string]string, flags *[]string, delayed *[]Attribute)

Attribute represents a function type that can inspect and manipulate the attributes and flags of an Element. This allows for dynamic behavior and customization of the Element's properties. - attrs is the current set of attributes for the element. - flags is a pointer to a list of flags for the element. Flags are attributes without values. - delayed is a pointer to a list of attributes that are evaluated during the rendering phase. (this is nil during the rendering phase!)

type ChildlessElementConstructor

type ChildlessElementConstructor func(attributes ...Attribute) Element

ChildlessElementConstructor is a function type that produces an Element that doesn't wrap any children. This constructor allows the specification of attributes for the resulting Element.

type Element

type Element interface {
	// Render writes the HTML representation of the element to the provided writer.
	Render(writer io.Writer) error
}

Element represents the basic interface that every HTML element must implement.

type ElementConstructor

type ElementConstructor func(attributes ...Attribute) ElementFactory

ElementConstructor is a function type that produces an ElementFactory for an Element. This constructor allows the specification of attributes for the resulting Element.

type ElementFactory

type ElementFactory func(children ...Element) Element

ElementFactory is a function type that produces an Element with an optional list of child Elements.

Jump to

Keyboard shortcuts

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