all repos — gomponents @ 5da578cfdf717ff1465f729194c8192a00412881

HTML components in pure Go

el/media.go (view raw)

1
2
3
4
5
6
7
8
9
package el

import (
	g "github.com/maragudk/gomponents"
)

func Img(src, alt string, children ...g.Node) g.NodeFunc {
	return g.El("img", prepend2(g.Attr("src", src), g.Attr("alt", alt), children)...)
}