tag

package
v0.0.0-...-932f57c Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstValidComponent

func FirstValidComponent(c h.HTMLComponent) h.HTMLComponent

func NewTag

func NewTag[T TagBuilderGetter[T]](dot T, name string, children ...h.HTMLComponent) T

func SetTag

func SetTag[T any](t TagBuilderGetter[T], tag *h.HTMLTagBuilder)

func Simplify

func Simplify(c h.HTMLComponent, cb func(c h.HTMLComponent))

Simplify Simplifies components walking over nested HTMLComponents and calls cb if component not is nil

func UpdatedDot

func UpdatedDot[T TagBuilderGetter[T]](dot T)

func Walk

func Walk(c h.HTMLComponent, cb func(c h.HTMLComponent) (state WalkState))

Types

type TagBuilder

type TagBuilder[T any] struct {
	// contains filtered or unexported fields
}

func (*TagBuilder[T]) Action

func (t *TagBuilder[T]) Action(v string) T

func (*TagBuilder[T]) Alt

func (t *TagBuilder[T]) Alt(v string) T

func (*TagBuilder[T]) AppendChild

func (t *TagBuilder[T]) AppendChild(c ...h.HTMLComponent) T

func (*TagBuilder[T]) Attr

func (t *TagBuilder[T]) Attr(vs ...interface{}) T

func (*TagBuilder[T]) AttrIf

func (t *TagBuilder[T]) AttrIf(key, value interface{}, add bool) T

func (*TagBuilder[T]) Charset

func (t *TagBuilder[T]) Charset(v string) T

func (*TagBuilder[T]) Checked

func (t *TagBuilder[T]) Checked(v bool) T

func (*TagBuilder[T]) Children

func (t *TagBuilder[T]) Children(c ...h.HTMLComponent) T

func (*TagBuilder[T]) Class

func (t *TagBuilder[T]) Class(names ...string) T

func (*TagBuilder[T]) ClassIf

func (t *TagBuilder[T]) ClassIf(name string, add bool) T

func (*TagBuilder[T]) Content

func (t *TagBuilder[T]) Content(v string) T

func (*TagBuilder[T]) Data

func (t *TagBuilder[T]) Data(vs ...string) T

func (*TagBuilder[T]) Disabled

func (t *TagBuilder[T]) Disabled(v bool) T

func (*TagBuilder[T]) Dot

func (t *TagBuilder[T]) Dot() T

func (*TagBuilder[T]) ErrorMessages

func (t *TagBuilder[T]) ErrorMessages(vs ...string) T

func (*TagBuilder[T]) Errors

func (t *TagBuilder[T]) Errors(err ...error) T

func (*TagBuilder[T]) For

func (t *TagBuilder[T]) For(v string) T

func (*TagBuilder[T]) GetAttr

func (t *TagBuilder[T]) GetAttr(key string) *h.Attr

func (*TagBuilder[T]) GetChildren

func (t *TagBuilder[T]) GetChildren() []h.HTMLComponent

func (*TagBuilder[T]) GetHTMLTagBuilder

func (t *TagBuilder[T]) GetHTMLTagBuilder() *h.HTMLTagBuilder

func (*TagBuilder[T]) GetTagBuilder

func (t *TagBuilder[T]) GetTagBuilder() *TagBuilder[T]

func (*TagBuilder[T]) Href

func (t *TagBuilder[T]) Href(v string) T

func (*TagBuilder[T]) ID

func (t *TagBuilder[T]) ID(v string) T

func (*TagBuilder[T]) Method

func (t *TagBuilder[T]) Method(v string) T

func (*TagBuilder[T]) Name

func (t *TagBuilder[T]) Name(v string) T

func (*TagBuilder[T]) OmitEndTag

func (t *TagBuilder[T]) OmitEndTag() T

func (*TagBuilder[T]) Placeholder

func (t *TagBuilder[T]) Placeholder(v string) T

func (*TagBuilder[T]) PrependChild

func (t *TagBuilder[T]) PrependChild(c ...h.HTMLComponent) T

func (*TagBuilder[T]) Property

func (t *TagBuilder[T]) Property(v string) T

func (*TagBuilder[T]) Readonly

func (t *TagBuilder[T]) Readonly(v bool) T

func (*TagBuilder[T]) Rel

func (t *TagBuilder[T]) Rel(v string) T

func (*TagBuilder[T]) RemoveAttr

func (t *TagBuilder[T]) RemoveAttr(key ...string) T

func (*TagBuilder[T]) Required

func (t *TagBuilder[T]) Required(v bool) T

func (*TagBuilder[T]) Role

func (t *TagBuilder[T]) Role(v string) T

func (*TagBuilder[T]) SetAttr

func (t *TagBuilder[T]) SetAttr(k string, v interface{}) T

func (*TagBuilder[T]) SetTag

func (t *TagBuilder[T]) SetTag(v string) T

func (*TagBuilder[T]) Src

func (t *TagBuilder[T]) Src(v string) T

func (*TagBuilder[T]) Style

func (t *TagBuilder[T]) Style(v string) T

func (*TagBuilder[T]) StyleIf

func (t *TagBuilder[T]) StyleIf(v string, add bool) T

func (*TagBuilder[T]) TabIndex

func (t *TagBuilder[T]) TabIndex(v int) T

func (*TagBuilder[T]) Target

func (t *TagBuilder[T]) Target(v string) T

func (*TagBuilder[T]) Text

func (t *TagBuilder[T]) Text(v string) T

func (*TagBuilder[T]) Title

func (t *TagBuilder[T]) Title(v string) T

func (*TagBuilder[T]) Type

func (t *TagBuilder[T]) Type(v string) T

func (*TagBuilder[T]) Value

func (t *TagBuilder[T]) Value(v string) T

func (*TagBuilder[T]) Write

func (t *TagBuilder[T]) Write(ctx *h.Context) (err error)

type TagBuilderGetter

type TagBuilderGetter[T any] interface {
	TagGetter
	GetTagBuilder() *TagBuilder[T]
}

type TagGetter

type TagGetter interface {
	GetHTMLTagBuilder() *h.HTMLTagBuilder
}

type WalkState

type WalkState uint8
const (
	SkipNext WalkState = iota + 1
	SkipAll
)

func WalkS

func WalkS(c h.HTMLComponent, cb func(c h.HTMLComponent) (state WalkState)) (state WalkState)

Jump to

Keyboard shortcuts

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