Documentation
¶
Index ¶
- func New(nodes ...node.Node) *element
- func PreloadAuto(nodes ...node.Node) *element
- func PreloadMetadata(nodes ...node.Node) *element
- func PreloadNone(nodes ...node.Node) *element
- func RawText(content string) *element
- func RawTextf(format string, args ...any) *element
- func Src(src string, nodes ...node.Node) *element
- func Static(content string) *element
- func Text(content string) *element
- func Textf(format string, args ...any) *element
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New Creates a new video element with optional child nodes Example: video.New() Renders: <video></video>
func PreloadAuto ¶
PreloadAuto Creates a video element with preload="auto" (loads entire video) Example: video.PreloadAuto() Renders: <video preload="auto"></video>
func PreloadMetadata ¶
PreloadMetadata Creates a video element with preload="metadata" (loads only metadata) Example: video.PreloadMetadata() Renders: <video preload="metadata"></video>
func PreloadNone ¶
PreloadNone Creates a video element with preload="none" (no preloading) Example: video.PreloadNone() Renders: <video preload="none"></video>
func RawText ¶
func RawText(content string) *element
RawText Creates a new video element with raw text content as unescaped HTML. Example: video.RawText("Your browser <em>doesn't</em> support video") Renders: <video>Your browser <em>doesn't</em> support video</video>
func RawTextf ¶
RawTextf Creates a new video element with formatted raw text content as unescaped HTML using text.RawTextf. Example: video.RawTextf("Your browser <em>%s</em> support video", "doesn't") Renders: <video>Your browser <em>doesn't</em> support video</video>
func Src ¶
Src Creates a new video element with src attribute and optional child nodes Example: video.Src("movie.mp4") Renders: <video src="movie.mp4"></video>
func Static ¶
func Static(content string) *element
Static Creates a new video element with static text content. Example: video.Static("Hello World") Renders: <video>Hello World</video>