embed

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Audio

func Audio(src string, width int, height int) *element

Audio Creates an embed element for audio content Example: embed.Audio("song.mp3", 320, 50) Renders: <embed src="song.mp3" type="audio/mpeg" width="320" height="50" />

func Flash

func Flash(src string, width int, height int) *element

Flash Creates an embed element for Flash content (legacy) Example: embed.Flash("animation.swf", 640, 480) Renders: <embed src="animation.swf" type="application/x-shockwave-flash" width="640" height="480" />

func New

func New() *element

New Creates a new embed element without any initial attributes. Example: embed.New() Renders: <embed />

func PDF

func PDF(src string, width int, height int) *element

PDF Creates an embed element for PDF documents Example: embed.PDF("document.pdf", 800, 600) Renders: <embed src="document.pdf" type="application/pdf" width="800" height="600" />

func Video

func Video(src string, width int, height int) *element

Video Creates an embed element for video content Example: embed.Video("movie.mp4", 640, 480) Renders: <embed src="movie.mp4" type="video/mp4" width="640" height="480" />

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