Package dev.fritz2.webcomponents

Types

Link copied to clipboard
abstract class WebComponent<E : Element>(observeAttributes: Boolean)

Implement this class to build a WebComponent.

Functions

Link copied to clipboard
fun <X : Element, T : WebComponent<X>> registerWebComponent(localName: String, webComponent: T, vararg observedAttributes: String)
fun <E : Element, T : WebComponent<E>> registerWebComponent(localName: String, constructor: KClass<T>, vararg observedAttributes: String)

registers a WebComponent at the browser's registry, so you can use it in fritz2 by custom-HtmlTag or in HTML. So to make a component that can be added by just importing your javascript, call this in main.