We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to MDN, permitted parents of <template> elements are:
<template>
Any element that accepts metadata content, phrasing content, or script-supporting elements. Also allowed as a child of a element that does not have a span attribute.
But currently template {} function cannot be used inside div {} etc.
template {}
div {}
The text was updated successfully, but these errors were encountered:
I just added my own <template> tag, because for some reason i can't find it in 0.12.0 even though it's supposed to be included 🤷♂
@Suppress("unused") open class TEMPLATE(initialAttributes: Map<String, String>, override val consumer: TagConsumer<*>) : HTMLTag( "template", consumer, initialAttributes, null, false, false ), HtmlBlockTag {} @HtmlTagMarker @OptIn(ExperimentalContracts::class) inline fun FlowContent.template(classes: String? = null, crossinline block: TEMPLATE.() -> Unit = {}): Unit { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } TEMPLATE(attributesMapOf("class", classes), consumer).visit(block) } @HtmlTagMarker @OptIn(ExperimentalContracts::class) public inline fun <T, C : TagConsumer<T>> C.template( classes: String? = null, crossinline block: TEMPLATE.() -> Unit = {} ): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } return TEMPLATE(attributesMapOf("class", classes), this) .visitAndFinalize(this, block) }
Sorry, something went wrong.
No branches or pull requests
According to MDN, permitted parents of
<template>
elements are:Any element that accepts metadata content, phrasing content, or script-supporting elements. Also allowed as a child of a element that does not have a span attribute.
But currently
template {}
function cannot be used insidediv {}
etc.The text was updated successfully, but these errors were encountered: