Package dev.fritz2.dom

Types

CommentNode
Link copied to clipboard
js
class CommentNode(content: String, domNode: Comment) : WithDomNode<Comment>
Represents a DOM-CommentNode
DomListener
Link copied to clipboard
js
class DomListener<E : Event, out X : Element>(events: Flow<E>) : Listener<E>
Handles a Flow of Dom Events.
EventContext
Link copied to clipboard
js
interface EventContext<out T : Element> : WithJob, WithEvents<T>
Context for handling events
HtmlTagMarker
Link copied to clipboard
js
annotation class HtmlTagMarker
A marker to separate the layers of calls in the type-safe-builder pattern.
Listener
Link copied to clipboard
js
open class Listener<E : Event>(events: Flow<E>)
Handles a Flow of Events
MultipleRootElementsException
Link copied to clipboard
js
class MultipleRootElementsException(message: String) : Exception
Occurs when more then one root Tag is defined in a render context.
Tag
Link copied to clipboard
js
open class Tag<out E : Element>(tagName: String, id: String?, baseClass: String?, job: Job, domNode: E) : WithDomNode<E> , WithComment<E> , EventContext<E> , TagContext
Represents a tag in the resulting HTML.
TextNode
Link copied to clipboard
js
class TextNode(content: String, domNode: Text) : WithDomNode<Text>
Represents a DOM-TextNode
Window
Link copied to clipboard
js
object Window
Represents all Events of the browser window object as WindowListeners
WindowListener
Link copied to clipboard
js
class WindowListener<E : Event>(events: Flow<E>) : Listener<E>
Handles a Flow of Window Events
WithComment
Link copied to clipboard
js
interface WithComment<out T : Node> : WithDomNode<T> , TagContext
Provides functionality to handle comments.
WithDomNode
Link copied to clipboard
js
external interface WithDomNode<out T : Node>
Base-interface for everything that represents a node in the DOM.
WithEvents
Link copied to clipboard
js
interface WithEvents<out T : Element> : WithDomNode<T>
Offers DomListeners for all DOM-events available.
WithText
Link copied to clipboard
js
interface WithText<N : Node> : WithDomNode<N> , TagContext
Interface providing functionality to handle text-content

Functions

enter
Link copied to clipboard
js
fun DomListener<KeyboardEvent, HTMLInputElement>.enter(): Flow<String>
Gives you the new value as String from the targeting Element when enter is pressed.
fun DomListener<KeyboardEvent, HTMLTextAreaElement>.enter(): Flow<String>
Gives you the new value as String from the targeting Element.
enterAsNumber
Link copied to clipboard
js
fun DomListener<KeyboardEvent, HTMLInputElement>.enterAsNumber(): Flow<Double>
Gives you the new value as Double from the targeting Element when enter is pressed.
files
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.files(): Flow<FileList?>
Gives you the FileList from the targeting Element.
key
Link copied to clipboard
js
fun <X : Element> DomListener<KeyboardEvent, X>.key(): Flow<Key>
Gives you the pressed key as Key from a KeyboardEvent.
fun <X : Element> WindowListener<KeyboardEvent>.key(): Flow<Key>
Gives you the pressed key as Key from a KeyboardEvent.
mountDomNode
Link copied to clipboard
js
fun <N : Node> mountDomNode(job: Job, target: N, upstream: Flow<WithDomNode<N>>)
Mounts the values of a Flow of WithDomNodes (mostly Tags) at this point in the DOM.
mountDomNodeList
Link copied to clipboard
js
fun <N : Node> mountDomNodeList(job: Job, target: N, upstream: Flow<List<WithDomNode<N>>>)
Mounts the a List of a Flow of WithDomNodes (mostly Tags) at this point in the DOM.
mountDomNodePatch
Link copied to clipboard
js
fun <N : Node> mountDomNodePatch(job: Job, target: N, upstream: Flow<List<Patch<WithDomNode<N>>>>, cancelJob: (Node) -> Unit)
Mounts Patches of a Flow of WithDomNodes (mostly Tags) at this point in the DOM.
mountDomNodeUnordered
Link copied to clipboard
js
fun <N : Node> mountDomNodeUnordered(job: Job, target: N, upstream: Flow<WithDomNode<N>>)
Mounts the values of a Flow of WithDomNodes (mostly Tags) at this point in the DOM.
selectedIndex
Link copied to clipboard
js
fun DomListener<Event, HTMLSelectElement>.selectedIndex(): Flow<Int>
Gives you the selected index as Int from the targeting Element.
selectedText
Link copied to clipboard
js
fun DomListener<Event, HTMLSelectElement>.selectedText(): Flow<String>
Gives you the selected text as String from the targeting Element.
selectedValue
Link copied to clipboard
js
fun DomListener<Event, HTMLSelectElement>.selectedValue(): Flow<String>
Gives you the selected value as String from the targeting Element.
states
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.states(): Flow<Boolean>
Gives you the checked value as Boolean from the targeting Element.
values
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
fun DomListener<Event, HTMLSelectElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
fun DomListener<Event, HTMLTextAreaElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
fun DomListener<InputEvent, HTMLInputElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
valuesAsNumber
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.valuesAsNumber(): Flow<Double>
Gives you the new value as Double from the targeting Element.
fun DomListener<InputEvent, HTMLInputElement>.valuesAsNumber(): Flow<Double>
Gives you the new value as Double from the targeting Element.