init(_:content:)

Creates a new HTML element with the specified tag and async content.

HtmlElement+Async.swift:10
init<AwaitedContent>(_ attributes: HTMLAttribute<Tag>..., @HTMLBuilder content: @escaping () async throws -> AwaitedContent) where Content == AsyncContent<AwaitedContent>, AwaitedContent : HTML

Parameters

attributes

The attributes to apply to the element.

content

The future content of the element.

The async content closure is automatically wrapped in an AsyncContent element and can only be rendered in an async context.