ysny.karibu-tools.karibu-tools.0.20.source-code.JsoupUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of karibu-tools Show documentation
Show all versions of karibu-tools Show documentation
Karibu-Tools: The Vaadin Missing Utilities
@file:Suppress("DEPRECATION")
package com.github.mvysny.kaributools
import com.vaadin.flow.server.InitialPageSettings
import org.jsoup.nodes.Element
/**
* Appends a `` element to the html head. Useful
* for [com.vaadin.flow.server.BootstrapListener] as a replacement for
* [com.vaadin.flow.server.PageConfigurator]'s [InitialPageSettings.addMetaTag].
*/
public fun Element.addMetaTag(name: String, content: String): Element =
appendElement("meta").attr("name", name).attr("content", content)