Initializersliemeobn.elementary 0.5.0Elementary
init(_:content:)
Creates a new HTML element with the specified attribute and content.
init(_ attribute: HTMLAttribute<Tag>, @HTMLBuilder content: () -> Content)
Creates a new HTML element with the specified attribute and content.
init(_ attribute: HTMLAttribute<Tag>, @HTMLBuilder content: () -> Content)
s10Elementary11HTMLElementV_7contentACyxq_GAA13HTMLAttributeVyxG_q_yXEtcfc
What are these?6OALV
import Elementary
struct HTMLElement<Tag, Content> where Tag : HTMLTrait.Paired, Content : HTML
An HTML element that can contain content.
struct HTMLAttribute<Tag> where Tag : HTMLTagDefinition
An HTML attribute that can be applied to an HTML element of the associated tag.
@resultBuilder struct HTMLBuilder
A result builder for building HTML components.
init(_ attributes: HTMLAttribute<Tag>..., @HTMLBuilder content: () -> Content)
Creates a new HTML element with the specified attributes and content.
init(attributes: [HTMLAttribute<Tag>], @HTMLBuilder content: () -> Content)
Creates a new HTML element with the specified attributes and content.
init(@HTMLBuilder content: () -> Content)
Creates a new HTML element with the specified content.
static func _render<Renderer>(_ html: consuming Self, into renderer: inout Renderer, with context: consuming _RenderingContext) where Renderer : _HTMLRendering
static func _render<Renderer>(_ html: consuming Self, into renderer: inout Renderer, with context: consuming _RenderingContext) async throws where Renderer : _AsyncHTMLRendering
var _attributes: _AttributeStorage
var content: Content
typealias Tag = Tag
The type of the HTML tag this element represents.