registerWebComponent

fun <X : Element, T : WebComponent<X>> registerWebComponent(localName: String, webComponent: T, vararg observedAttributes: String)

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

Parameters

localName

name of the new custom tag (must contain a '-')

observedAttributes

attributes to be observed, changes will occur on WebComponent.attributeChanges

webComponent

instance of a WebComponent

fun <X : Element, T : WebComponent<X>> 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-Tag or in HTML. So to make a component that can be added by just importing your javascript, call this in main.

Parameters

constructor

class describing the component to register implementing WebComponent

localName

name of the new custom tag (must contain a '-')

observedAttributes

attributes to be observed, changes will occur on WebComponent.attributeChanges