Documentation ¶ Index ¶ Variables func New(nodes ...node.Node) *element type Element Constants ¶ This section is empty. Variables ¶ View Source var ( TagOpen = []byte("<picture") TagClose = []byte("</picture>") ) Byte constants for HTML rendering. Functions ¶ func New ¶ func New(nodes ...node.Node) *element New Creates a new picture element with source and img child elements. Example: picture.New(source.ImageWebP("photo.webp"), img.Src("photo.jpg")) Renders: <picture><source srcset="photo.webp" type="image/webp"><img src="photo.jpg"></picture> Types ¶ type Element ¶ type Element = element Element is an exported alias for the private element type Source Files ¶ View all Source files constants.gopicture.go Click to show internal directories. Click to hide internal directories.