object

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Audio

func Audio(data string, nodes ...node.Node) *element

Audio Creates an object element for audio content Example: object.Audio("/audio.mp3") Renders: <object data="/audio.mp3" type="audio/mpeg"></object>

func Flash

func Flash(data string, nodes ...node.Node) *element

Flash Creates an object element for Flash content (legacy) Example: object.Flash("/animation.swf") Renders: <object data="/animation.swf" type="application/x-shockwave-flash"></object>

func New

func New(nodes ...node.Node) *element

New Creates a new object element with optional child nodes Example: object.New() Renders: <object></object>

func PDF

func PDF(data string, nodes ...node.Node) *element

PDF Creates an object element for PDF documents Example: object.PDF("/document.pdf") Renders: <object data="/document.pdf" type="application/pdf"></object>

func RawText

func RawText(content string) *element

RawText Creates a new object element with raw text content as fallback

func RawTextf

func RawTextf(format string, args ...any) *element

RawTextf Creates a new object element with formatted raw text content as fallback (unescaped HTML)

func Static

func Static(content string) *element

Static Creates a new object element with static text content

func Text

func Text(content string) *element

Text Creates a new object element with text content as fallback

func Textf

func Textf(format string, args ...any) *element

Textf Creates a new object element with formatted text content as fallback (HTML-encoded)

func Video

func Video(data string, nodes ...node.Node) *element

Video Creates an object element for video content Example: object.Video("/video.mp4") Renders: <object data="/video.mp4" type="video/mp4"></object>

Types

type Element

type Element = element

Element is an exported alias for the private element type

Jump to

Keyboard shortcuts

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