Documentation
¶
Index ¶
- func AudioMP3(src string) *element
- func AudioOgg(src string) *element
- func AudioWav(src string) *element
- func ImageAVIF(srcset string) *element
- func ImageWebP(srcset string) *element
- func New() *element
- func VideoMP4(src string) *element
- func VideoOgg(src string) *element
- func VideoWebM(src string) *element
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AudioMP3 ¶
func AudioMP3(src string) *element
AudioMP3 Creates an audio source element with MP3 type Example: source.AudioMP3("song.mp3") Renders: <source src="song.mp3" type="audio/mpeg" />
func AudioOgg ¶
func AudioOgg(src string) *element
AudioOgg Creates an audio source element with Ogg type Example: source.AudioOgg("song.ogg") Renders: <source src="song.ogg" type="audio/ogg" />
func AudioWav ¶
func AudioWav(src string) *element
AudioWav Creates an audio source element with WAV type Example: source.AudioWav("sound.wav") Renders: <source src="sound.wav" type="audio/wav" />
func ImageAVIF ¶
func ImageAVIF(srcset string) *element
ImageAVIF Creates an image source element with AVIF type (for use in picture elements) Example: source.ImageAVIF("image.avif") Renders: <source type="image/avif" srcset="image.avif" />
func ImageWebP ¶
func ImageWebP(srcset string) *element
ImageWebP Creates an image source element with WebP type (for use in picture elements) Example: source.ImageWebP("image.webp") Renders: <source type="image/webp" srcset="image.webp" />
func New ¶
func New() *element
New Creates a new source element without any initial attributes. Example: source.New().Src("image.webp").Type("image/webp") Renders: <source src="image.webp" type="image/webp" />
func VideoMP4 ¶
func VideoMP4(src string) *element
VideoMP4 Creates a video source element with MP4 type Example: source.VideoMP4("movie.mp4") Renders: <source src="movie.mp4" type="video/mp4" />