Package-level declarations

Types

Link copied to clipboard

Occurs when Lens points to non-existing element.

Link copied to clipboard

Occurs when Lens tries to update a non-existing element.

Link copied to clipboard
typealias DomLifecycleHandler = suspend (WithDomNode<Element>, Any?) -> Unit

Defines type for a handler for lifecycle-events

Link copied to clipboard

This adapter class just lifts the DOM API NodeList type into Kotlin's collection API.

Link copied to clipboard
class EmittingHandler<A, E>(val collectWithChannel: (Flow<A>, FlowCollector<E>, Job) -> Unit, flow: MutableSharedFlow<E> = MutableSharedFlow()) : Handler<A> , Flow<E>

An EmittingHandler is a special Handler that constitutes a new Flow by itself. You can emit values to this Flow from your code and connect it to other Handlers on this or on other Stores. This way inter-store-communication is done in fritz2.

Link copied to clipboard
interface Handler<A>

Base-interface of the different types of handlers

Link copied to clipboard
open class HtmlTag<out E : Element>(tagName: String, val id: String? = null, val baseClass: String? = null, val job: Job, val scope: Scope) : Tag<E>

Implementation of Tag to represent HTML5-tags.

Link copied to clipboard
annotation class HtmlTagMarker

A marker to separate the layers of calls in the type-safe-builder pattern.

Link copied to clipboard
object Id
Link copied to clipboard
typealias IdProvider<T, I> = (T) -> I

function to derive a valid id for a given instance that does not change over time.

Link copied to clipboard
interface Inspector<D>

represents the data and corresponding id of certain value in a deep nested model structure.

Link copied to clipboard
object Keys

This object offers expressive access to predefined Shortcuts and ModifierShortcuts taken from the specification extended with Space as symbol for simple space.

Link copied to clipboard
interface Lens<P, T>

Describes a focus point into a data structure, i.e. a property of a given complex entity

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Lenses

Used by the fritz2 gradle-plugin to identify data classes it should generate Lenses for.

Link copied to clipboard
class Listener<X : Event, out T : EventTarget>(events: Flow<X>) : Flow<X>

Encapsulates the Flow of the Event.

Link copied to clipboard

This interface models the modifier shortcuts, that enable combination of shortcuts like "STRG + F" or alike.

Link copied to clipboard
interface MountPoint

External interface to access the MountPoint where the lifecycle of Tags and subtrees is handled.

Link copied to clipboard

Occurs when the targeted html element is not present in document.

Link copied to clipboard
object Myer

Implementation of Myer's diff algorithm on two Lists creating a Flow of Patches.

Link copied to clipboard
class OnlyOnceFlow<T>(value: T) : Flow<T>

This Flow implementation represents a flow that emits exactly one value during its lifetime.

Link copied to clipboard
sealed class Patch<out T>

A Patch describes the changes made to a List.

Link copied to clipboard

Context for rendering static and dynamical content

Link copied to clipboard
class RootInspector<T>(val data: T) : Inspector<T>

RootInspector is the starting point for getting your data and corresponding paths from your deep nested model structure. Get this by calling the factory method inspectorOf.

Link copied to clipboard
open class RootStore<D>(initialData: D, job: Job, val id: String = Id.next()) : Store<D>

A Store can be initialized with a given value.

Link copied to clipboard
value class Scope(entries: HashMap<Scope.Key<*>, Any> = hashMapOf())

Contains any type of data which consists of a Key and a corresponding value object.

Link copied to clipboard
class ScopeContext(current: Scope)

Context for setting new entries to a Scope object.

Link copied to clipboard
data class Shortcut(val key: String, val ctrl: Boolean = false, val alt: Boolean = false, val shift: Boolean = false, val meta: Boolean = false) : ModifierShortcut

Shortcut represents a grouping type upon the "key" and the modifier key properties of a KeyboardEvent. More info here

Link copied to clipboard
value class SimpleHandler<A>(val process: (Flow<A>, Job) -> Unit) : Handler<A>

Defines, how to handle actions in your Store. Each Handler accepts actions of a defined type. If your handler just needs the current value of the Store and no action, use Unit.

Link copied to clipboard
interface Store<D>

Store interface is the main type for all two-way data binding activities.

Link copied to clipboard
class SubInspector<P, T>(val parent: Inspector<P>, lens: Lens<P, T>) : Inspector<T>

A Inspector that is derived from a parent Inspector mapping its data by a given Lens.

Link copied to clipboard
class SubStore<P, D>(val parent: Store<P>, lens: Lens<P, D>) : Store<D>

A Store that is derived from a parent Store mapping its data in both ways by a given Lens.

Link copied to clipboard
class SvgTag(tagName: String, id: String? = null, baseClass: String? = null, job: Job, scope: Scope) : HtmlTag<SVGElement>

Implementation of HtmlTag to represent the JavaScript SVGElement to Kotlin

Link copied to clipboard
interface Tag<out E : Element> : RenderContext, WithDomNode<E> , WithEvents<E>

Represents a tag. Sorry for the name, but we needed to delimit it from the Element it is wrapping.

Link copied to clipboard
class Transition(val enter: String? = null, val enterStart: String? = null, val enterEnd: String? = null, val leave: String? = null, val leaveStart: String? = null, val leaveEnd: String? = null)

Definition of a css-transition (enter and/or leave) to be executed when a Tag is mounted to or removed from the DOM.

Link copied to clipboard
typealias Update<D> = suspend (D) -> D

Defines a type for transforming one value into the next

Link copied to clipboard

Represents all Events of the browser window object as Event-flows

Link copied to clipboard
external interface WithDomNode<out N : Node>

Base-interface for everything that represents a node in the DOM.

Link copied to clipboard
interface WithEvents<out T : EventTarget>

Contains all javascript event types. Take a look here.

Link copied to clipboard
interface WithJob

Marks a class that it has a Job to start coroutines with.

Link copied to clipboard
interface WithScope

Marks a class that it has Scope which can be transferred for adding/receiving additional information.

Properties

Link copied to clipboard

a native function returning a Promise that is completed, when the currently running animations (if any) on a given Node have finished.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Defines the dedicated style class, that any mount-point will get by default. Its only purpose is to exclude the mount-point tag to appear in the visual representation of the DOM.

Link copied to clipboard
const val SVG_XMLNS: String

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Adds global css-rules to a fritz2-specific stylesheet added to the document when first called

Link copied to clipboard

Adds global css-rules to a fritz2-specific stylesheet added to the document when first called

Link copied to clipboard
fun <T : Element> Tag<T>.afterMount(payload: Any? = null, handler: DomLifecycleHandler)

Convenience method to register lifecycle handler for after a Tag is mounted

Link copied to clipboard
fun Tag<HTMLAppletElement>.align(value: Flow<String>)
fun Tag<HTMLDivElement>.align(value: Flow<String>)
fun Tag<HTMLEmbedElement>.align(value: Flow<String>)
fun Tag<HTMLHRElement>.align(value: Flow<String>)
fun Tag<HTMLHeadingElement>.align(value: Flow<String>)
fun Tag<HTMLIFrameElement>.align(value: Flow<String>)
fun Tag<HTMLImageElement>.align(value: Flow<String>)
fun Tag<HTMLInputElement>.align(value: Flow<String>)
fun Tag<HTMLLegendElement>.align(value: Flow<String>)
fun Tag<HTMLObjectElement>.align(value: Flow<String>)
fun Tag<HTMLTableColElement>.align(value: Flow<String>)
fun Tag<HTMLTableElement>.align(value: Flow<String>)
fun Tag<HTMLTableRowElement>.align(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLIFrameElement>.allowFullscreen(value: Boolean, trueValue: String = "")
fun Tag<HTMLIFrameElement>.allowFullscreen(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLIFrameElement>.allowUserMedia(value: Boolean, trueValue: String = "")
fun Tag<HTMLIFrameElement>.allowUserMedia(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLAppletElement>.alt(value: Flow<String>)
fun Tag<HTMLAreaElement>.alt(value: Flow<String>)
fun Tag<HTMLImageElement>.alt(value: Flow<String>)
fun Tag<HTMLInputElement>.alt(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Creates a DomNodeList containing all HTMLElements from the DOM API based NodeList.

Link copied to clipboard
fun <P> Lens<P, Boolean?>.asString(emptyValue: String = ""): Lens<P, String>

Creates a Lens from Boolean to String

fun <P> Lens<P, Byte>.asString(): Lens<P, String>
fun <P> Lens<P, Byte?>.asString(emptyValue: String = ""): Lens<P, String>

Creates a Lens from Byte to String

fun <P> Lens<P, Double?>.asString(emptyValue: String = ""): Lens<P, String>

Creates a Lens from Double to String

fun <P> Lens<P, Float>.asString(): Lens<P, String>
fun <P> Lens<P, Float?>.asString(emptyValue: String = ""): Lens<P, String>

Creates a Lens from Float to String

fun <P> Lens<P, Int>.asString(): Lens<P, String>
fun <P> Lens<P, Int?>.asString(emptyValue: String = ""): Lens<P, String>

Creates a Lens from Int to String

fun <P> Lens<P, Long>.asString(): Lens<P, String>
fun <P> Lens<P, Long?>.asString(emptyValue: String = ""): Lens<P, String>

Creates a Lens from Long to String

fun <P> Lens<P, Short>.asString(): Lens<P, String>
fun <P> Lens<P, Short?>.asString(emptyValue: String = ""): Lens<P, String>

Creates a Lens from Short to String

Link copied to clipboard
fun Tag<HTMLScriptElement>.async(value: Boolean, trueValue: String = "")
fun Tag<HTMLScriptElement>.async(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLButtonElement>.autofocus(value: Boolean, trueValue: String = "")
fun Tag<HTMLButtonElement>.autofocus(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLInputElement>.autofocus(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.autofocus(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLKeygenElement>.autofocus(value: Boolean, trueValue: String = "")
fun Tag<HTMLKeygenElement>.autofocus(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLSelectElement>.autofocus(value: Boolean, trueValue: String = "")
fun Tag<HTMLSelectElement>.autofocus(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.autofocus(value: Boolean, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.autofocus(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLMediaElement>.autoplay(value: Boolean, trueValue: String = "")
fun Tag<HTMLMediaElement>.autoplay(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T : Element> Tag<T>.beforeUnmount(payload: Any? = null, handler: DomLifecycleHandler)

Convenience method to register lifecycle handler for before a Tag is unmounted

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLInputElement>.checked(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.checked(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLMenuItemElement>.checked(value: Boolean, trueValue: String = "")
fun Tag<HTMLMenuItemElement>.checked(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLModElement>.cite(value: Flow<String>)
fun Tag<HTMLQuoteElement>.cite(value: Flow<String>)
Link copied to clipboard
fun classes(vararg classes: String?): String

Joins all given classes strings to one html-class-attribute String by filtering all out which are null or blank.

Link copied to clipboard
fun Tag<HTMLBRElement>.clear(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLFontElement>.color(value: Flow<String>)
fun Tag<HTMLHRElement>.color(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLDListElement>.compact(value: Boolean, trueValue: String = "")
fun Tag<HTMLDListElement>.compact(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLDirectoryElement>.compact(value: Boolean, trueValue: String = "")
fun Tag<HTMLDirectoryElement>.compact(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLMenuElement>.compact(value: Boolean, trueValue: String = "")
fun Tag<HTMLMenuElement>.compact(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLOListElement>.compact(value: Boolean, trueValue: String = "")
fun Tag<HTMLOListElement>.compact(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLUListElement>.compact(value: Boolean, trueValue: String = "")
fun Tag<HTMLUListElement>.compact(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun <E : Event> Flow<E>.composedPath(): Flow<Array<EventTarget>>

Calls Event.composedPath on the Event-flow.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLMediaElement>.controls(value: Boolean, trueValue: String = "")
fun Tag<HTMLMediaElement>.controls(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun SvgTag.d(value: String)
fun SvgTag.d(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLObjectElement>.declare(value: Boolean, trueValue: String = "")
fun Tag<HTMLObjectElement>.declare(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLMenuItemElement>.default(value: Boolean, trueValue: String = "")
fun Tag<HTMLMenuItemElement>.default(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLTrackElement>.default(value: Boolean, trueValue: String = "")
fun Tag<HTMLTrackElement>.default(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLInputElement>.defaultChecked(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.defaultChecked(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLMediaElement>.defaultMuted(value: Boolean, trueValue: String = "")
fun Tag<HTMLMediaElement>.defaultMuted(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLOptionElement>.defaultSelected(value: Boolean, trueValue: String = "")
fun Tag<HTMLOptionElement>.defaultSelected(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLScriptElement>.defer(value: Boolean, trueValue: String = "")
fun Tag<HTMLScriptElement>.defer(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLElement>.dir(value: String)
fun Tag<HTMLElement>.dir(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLButtonElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLButtonElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLFieldSetElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLFieldSetElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLInputElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLKeygenElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLKeygenElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLMenuItemElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLMenuItemElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLOptGroupElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLOptGroupElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLOptionElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLOptionElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLSelectElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLSelectElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.disabled(value: Boolean, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.disabled(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.draggable(value: Boolean, trueValue: String = "")
fun Tag<HTMLElement>.draggable(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLFontElement>.face(value: Flow<String>)
Link copied to clipboard

Extracts a FileList from the Event.target.

Link copied to clipboard
fun SvgTag.fill(value: String)
fun SvgTag.fill(value: Flow<String>)
Link copied to clipboard
fun <T> flowOnceOf(value: T): OnlyOnceFlow<T>

This factory function creates an OnlyOnceFlow.

Link copied to clipboard
fun Tag<HTMLLabelElement>.for(value: Flow<String>)
fun Tag<HTMLScriptElement>.for(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLButtonElement>.formNoValidate(value: Boolean, trueValue: String = "")
fun Tag<HTMLButtonElement>.formNoValidate(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLInputElement>.formNoValidate(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.formNoValidate(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.hidden(value: Boolean, trueValue: String = "")
fun Tag<HTMLElement>.hidden(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLAnchorElement>.href(value: Flow<String>)
fun Tag<HTMLAreaElement>.href(value: Flow<String>)
fun Tag<HTMLBaseElement>.href(value: Flow<String>)
fun Tag<HTMLLinkElement>.href(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.id(value: String)
fun Tag<HTMLElement>.id(value: Flow<String>)
Link copied to clipboard
fun Tag<HTMLInputElement>.indeterminate(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.indeterminate(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <D> Inspector<List<D>>.inspectEach(action: (Inspector<D>) -> Unit)
fun <K, V> Inspector<Map<K, V>>.inspectEach(action: (K, Inspector<V>) -> Unit)
fun <D, I> Inspector<List<D>>.inspectEach(idProvider: IdProvider<D, I>, action: (Inspector<D>) -> Unit)

Performs the given action on each Inspector.

Link copied to clipboard
fun <D> inspectorOf(data: D): Inspector<D>

gives you a new Inspector as starting point.

Link copied to clipboard
operator fun Handler<Unit>.invoke()

Calls this handler exactly once.

Link copied to clipboard
fun Tag<HTMLImageElement>.isMap(value: Boolean, trueValue: String = "")
fun Tag<HTMLImageElement>.isMap(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.lang(value: String)
fun Tag<HTMLElement>.lang(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
fun <K, V> lensForElement(key: K): Lens<Map<K, V>, V>

creates a Lens pointing to a certain element in a Map

fun <T> lensForElement(index: Int): Lens<List<T>, T>

creates a Lens pointing to a certain index in a list

fun <T, I> lensForElement(element: T, idProvider: IdProvider<T, I>): Lens<List<T>, T>

creates a Lens pointing to a certain element in a List

Link copied to clipboard
inline fun <P> lensOf(crossinline format: (P) -> String, crossinline parse: (String) -> P): Lens<P, String>

creates a Lens converting P to and from a String

inline fun <P, T> lensOf(id: String, crossinline getter: (P) -> T, crossinline setter: (P, T) -> P): Lens<P, T>

convenience function to create a Lens

Link copied to clipboard
fun Tag<HTMLBodyElement>.link(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLMarqueeElement>.loop(value: Flow<Int>)
fun Tag<HTMLMediaElement>.loop(value: Boolean, trueValue: String = "")
fun Tag<HTMLMediaElement>.loop(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLMeterElement>.low(value: Flow<Double>)
Link copied to clipboard
Link copied to clipboard
fun <P, T> Store<P?>.map(lens: Lens<P & Any, T>): Store<T>

on a Store of nullable data this creates a Store with a nullable parent and non-nullable value. It can be called using a Lens on a non-nullable parent (that can be created by using the @Lenses-annotation), but you have to ensure, that the resulting Store is never used, when it's parent's value is null. Otherwise, a NullPointerException is thrown.

Link copied to clipboard
fun <D, I> Inspector<List<D>>.mapByElement(element: D, idProvider: IdProvider<D, I>): Inspector<D>

Creates a new Inspector containing the element for the given element and idProvider from the original Inspector's List.

fun <D, I> Store<List<D>>.mapByElement(element: D, idProvider: IdProvider<D, I>): Store<D>

Creates a new Store containing the element for the given element and idProvider from the original Store's List.

Link copied to clipboard

Creates a new Inspector containing the element for the given index from the original Inspector's List

fun <D> Store<List<D>>.mapByIndex(index: Int): Store<D>

Creates a new Store containing the element for the given index from the original Store's List

Link copied to clipboard
fun <K, V> Inspector<Map<K, V>>.mapByKey(key: K): Inspector<V>

Creates a new Inspector containing the value for the given key from the original Inspector's Map

fun <K, V> Store<Map<K, V>>.mapByKey(key: K): Store<V>

Creates a new Store containing the corresponding value for the given key from the original Store's Map.

Link copied to clipboard
fun <D> Inspector<D?>.mapNull(default: D): Inspector<D>

Creates a new Inspector from a nullable parent inspector that either contains the original value or a given default value if the original value was null.

fun <T> Store<T?>.mapNull(default: T): Store<T>

Creates a new Store from a nullable parent store that either contains the original value or a given default value if the original value was null.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLInputElement>.min(value: Flow<String>)
fun Tag<HTMLMeterElement>.min(value: Flow<Double>)
Link copied to clipboard
Link copied to clipboard

Allows to access the nearest MountPoint from any WithScope

Link copied to clipboard
inline fun <T> mountSimple(parentJob: Job, upstream: Flow<T>, crossinline collect: suspend (T) -> Unit)

collects the values of a given Flow one by one. Use this for data-types that represent a single (simple or complex) value.

Link copied to clipboard
fun Tag<HTMLInputElement>.multiple(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.multiple(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLSelectElement>.multiple(value: Boolean, trueValue: String = "")
fun Tag<HTMLSelectElement>.multiple(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLMediaElement>.muted(value: Boolean, trueValue: String = "")
fun Tag<HTMLMediaElement>.muted(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLAnchorElement>.name(value: Flow<String>)
fun Tag<HTMLAppletElement>.name(value: Flow<String>)
fun Tag<HTMLButtonElement>.name(value: Flow<String>)
fun Tag<HTMLEmbedElement>.name(value: Flow<String>)
fun Tag<HTMLFieldSetElement>.name(value: Flow<String>)
fun Tag<HTMLFormElement>.name(value: Flow<String>)
fun Tag<HTMLFrameElement>.name(value: Flow<String>)
fun Tag<HTMLIFrameElement>.name(value: Flow<String>)
fun Tag<HTMLImageElement>.name(value: Flow<String>)
fun Tag<HTMLInputElement>.name(value: Flow<String>)
fun Tag<HTMLKeygenElement>.name(value: Flow<String>)
fun Tag<HTMLMapElement>.name(value: Flow<String>)
fun Tag<HTMLMetaElement>.name(value: Flow<String>)
fun Tag<HTMLObjectElement>.name(value: Flow<String>)
fun Tag<HTMLOutputElement>.name(value: Flow<String>)
fun Tag<HTMLParamElement>.name(value: Flow<String>)
fun Tag<HTMLSelectElement>.name(value: Flow<String>)
fun Tag<HTMLSlotElement>.name(value: Flow<String>)
fun Tag<HTMLTextAreaElement>.name(value: Flow<String>)
Link copied to clipboard
fun Tag<HTMLElement>.nodeValue(value: Flow<String?>)
Link copied to clipboard
fun Tag<HTMLAreaElement>.noHref(value: Boolean, trueValue: String = "")
fun Tag<HTMLAreaElement>.noHref(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLFrameElement>.noResize(value: Boolean, trueValue: String = "")
fun Tag<HTMLFrameElement>.noResize(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLHRElement>.noShade(value: Boolean, trueValue: String = "")
fun Tag<HTMLHRElement>.noShade(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLFormElement>.noValidate(value: Boolean, trueValue: String = "")
fun Tag<HTMLFormElement>.noValidate(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLTableCellElement>.noWrap(value: Boolean, trueValue: String = "")
fun Tag<HTMLTableCellElement>.noWrap(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLDetailsElement>.open(value: Boolean, trueValue: String = "")
fun Tag<HTMLDetailsElement>.open(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLDialogElement>.open(value: Boolean, trueValue: String = "")
fun Tag<HTMLDialogElement>.open(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLVideoElement>.playsInline(value: Boolean, trueValue: String = "")
fun Tag<HTMLVideoElement>.playsInline(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard

Enables combination of ModifierShortcuts like "STRG + ALT + F":

operator fun Scope.plus(scope: ScopeContext.() -> Unit): ScopeContext.() -> Unit
operator fun ScopeContext.() -> Unit.plus(scope: Scope): ScopeContext.() -> Unit
operator fun ScopeContext.() -> Unit.plus(plus: ScopeContext.() -> Unit): ScopeContext.() -> Unit
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <E : Event> Flow<E>.preventDefault(): Flow<E>

Calls Event.preventDefault on the Event-flow.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLInputElement>.readOnly(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.readOnly(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.readOnly(value: Boolean, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.readOnly(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLAnchorElement>.rel(value: Flow<String>)
fun Tag<HTMLAreaElement>.rel(value: Flow<String>)
fun Tag<HTMLLinkElement>.rel(value: Flow<String>)
Link copied to clipboard
fun render(selector: String, override: Boolean = true, scope: ScopeContext.() -> Unit = {}, content: RenderContext.() -> Unit)

Creates a RenderContext for Tags and mounts it to a constant element in the static html file which id matches the selector.

fun render(targetElement: HTMLElement? = document.body, override: Boolean = true, scope: ScopeContext.() -> Unit = {}, content: RenderContext.() -> Unit)

Creates a RenderContext for Tags and mounts it to a targetElement.

Link copied to clipboard
fun Tag<HTMLInputElement>.required(value: Boolean, trueValue: String = "")
fun Tag<HTMLInputElement>.required(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLSelectElement>.required(value: Boolean, trueValue: String = "")
fun Tag<HTMLSelectElement>.required(value: Flow<Boolean>, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.required(value: Boolean, trueValue: String = "")
fun Tag<HTMLTextAreaElement>.required(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLAnchorElement>.rev(value: Flow<String>)
fun Tag<HTMLLinkElement>.rev(value: Flow<String>)
Link copied to clipboard
fun Tag<HTMLOListElement>.reversed(value: Boolean, trueValue: String = "")
fun Tag<HTMLOListElement>.reversed(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLOptionElement>.selected(value: Boolean, trueValue: String = "")
fun Tag<HTMLOptionElement>.selected(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The function generates a Shortcut object out of a String.

The function generates a Shortcut object out of a KeyboardEvent.

Link copied to clipboard
fun Tag<HTMLFontElement>.size(value: Flow<String>)
fun Tag<HTMLHRElement>.size(value: Flow<String>)
fun Tag<HTMLInputElement>.size(value: Flow<Int>)
fun Tag<HTMLSelectElement>.size(value: Flow<Int>)
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.slot(value: String)
fun Tag<HTMLElement>.slot(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.spellcheck(value: Boolean, trueValue: String = "")
fun Tag<HTMLElement>.spellcheck(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLEmbedElement>.src(value: Flow<String>)
fun Tag<HTMLFrameElement>.src(value: Flow<String>)
fun Tag<HTMLIFrameElement>.src(value: Flow<String>)
fun Tag<HTMLImageElement>.src(value: Flow<String>)
fun Tag<HTMLInputElement>.src(value: Flow<String>)
fun Tag<HTMLMediaElement>.src(value: Flow<String>)
fun Tag<HTMLScriptElement>.src(value: Flow<String>)
fun Tag<HTMLSourceElement>.src(value: Flow<String>)
fun Tag<HTMLTrackElement>.src(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLOListElement>.start(value: Flow<Int>)
Link copied to clipboard

Extracts the HTMLInputElement.checked state from the Event.target.

Link copied to clipboard
Link copied to clipboard
fun <E : Event> Flow<E>.stopImmediatePropagation(): Flow<E>
Link copied to clipboard
fun <E : Event> Flow<E>.stopPropagation(): Flow<E>

Calls Event.stopPropagation on the Event-flow.

Link copied to clipboard
fun <D> storeOf(initialData: D, job: Job, id: String = Id.next()): Store<D>

Convenience function to create a simple Store without any handlers, etc.

Link copied to clipboard
fun <D> WithJob.storeOf(initialData: D, job: Job = this.job, id: String = Id.next()): Store<D>

Convenience function to create a simple Store without any handlers, etc.

Link copied to clipboard
fun <X : Event, T : EventTarget> T.subscribe(name: String, capture: Boolean = false, init: Event.() -> Unit = {}): Listener<X, T>

Creates a Listener for the given Event type and name.

Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.tabIndex(value: Flow<Int>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLElement>.title(value: Flow<String>)
Link copied to clipboard
fun Tag<HTMLElement>.transition(enter: String? = null, enterStart: String? = null, enterEnd: String? = null, leave: String? = null, leaveStart: String? = null, leaveEnd: String? = null)

Applies a transition (enter and/or leave) to a Tag. The enter-transition will be executed right after the Tag is mounted to the DOM. The leave-transition will be executed right before the Tag is removed from the DOM. Further operation of the MountPoint rendering the Tag is suspended until the leave-animation is done.

fun Tag<HTMLElement>.transition(on: Flow<Boolean>, transition: Transition)
fun Tag<HTMLElement>.transition(on: Flow<Boolean>, enter: String? = null, enterStart: String? = null, enterEnd: String? = null, leave: String? = null, leaveStart: String? = null, leaveEnd: String? = null)

Applies a transition (enter and/or leave) to a Tag whenever a new value appears on a Flow The enter-transition will be executed when true appears on the Flow The leave-transition will be executed when false appears on the Flow Processing of further operations will not wait for the animation to finish.

Link copied to clipboard
fun Tag<HTMLElement>.translate(value: Boolean, trueValue: String = "")
fun Tag<HTMLElement>.translate(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
fun Tag<HTMLMarqueeElement>.trueSpeed(value: Boolean, trueValue: String = "")
fun Tag<HTMLMarqueeElement>.trueSpeed(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
fun Tag<HTMLObjectElement>.typeMustMatch(value: Boolean, trueValue: String = "")
fun Tag<HTMLObjectElement>.typeMustMatch(value: Flow<Boolean>, trueValue: String = "")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun SvgTag.viewBox(value: String)
fun SvgTag.viewBox(value: Flow<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun WithDomNode<*>.waitForAnimation()

wait for a running animation on the DOM-Node to finish.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard