Upgrade to Kotlin 1.9.0, kotlinx-html 0.9.1, version 1.1.1.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package nl.astraeus.komp
|
||||
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.Element
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.events.EventListener
|
||||
import org.w3c.dom.get
|
||||
|
||||
private fun Int.asSpaces(): String {
|
||||
|
||||
@@ -7,13 +7,13 @@ import kotlinx.html.FlowOrMetaDataOrPhrasingContent
|
||||
import kotlinx.html.Tag
|
||||
import kotlinx.html.TagConsumer
|
||||
import kotlinx.html.Unsafe
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.Element
|
||||
import org.w3c.dom.HTMLElement
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
import org.w3c.dom.HTMLSpanElement
|
||||
import org.w3c.dom.Node
|
||||
import org.w3c.dom.asList
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.get
|
||||
|
||||
private var currentElement: Element? = null
|
||||
@@ -240,7 +240,7 @@ class HtmlBuilder(
|
||||
override fun onTagEvent(
|
||||
tag: Tag,
|
||||
event: String,
|
||||
value: (Event) -> Unit
|
||||
value: (kotlinx.html.org.w3c.dom.events.Event) -> Unit
|
||||
) {
|
||||
logReplace { "onTagEvent, ${tag.tagName} [$event, $value]" }
|
||||
|
||||
@@ -248,7 +248,7 @@ class HtmlBuilder(
|
||||
checkTag(tag)
|
||||
}
|
||||
|
||||
currentElement?.setKompEvent(event.toLowerCase(), value)
|
||||
currentElement?.setKompEvent(event.lowercase(), value.asDynamic())
|
||||
}
|
||||
|
||||
override fun onTagEnd(tag: Tag) {
|
||||
@@ -395,7 +395,7 @@ class HtmlBuilder(
|
||||
currentPosition.nextElement()
|
||||
}
|
||||
|
||||
override fun onTagError(tag: Tag, exception: Throwable) {
|
||||
fun onTagError(tag: Tag, exception: Throwable) {
|
||||
exceptionThrown = true
|
||||
|
||||
if (exception !is KomponentException) {
|
||||
|
||||
@@ -31,7 +31,7 @@ class MutableCollectionStateDelegate<T>(
|
||||
}
|
||||
|
||||
// todo: return iterator wrapper to update at changes?
|
||||
// override fun iterator(): MutableIterator<T> = collection.iterator()
|
||||
//override fun iterator(): MutableIterator<T> = collection.iterator()
|
||||
|
||||
override fun remove(element: T): Boolean {
|
||||
komponent.requestUpdate()
|
||||
|
||||
@@ -14,8 +14,8 @@ interface Delegate<T> {
|
||||
property: KProperty<*>,
|
||||
value: T
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open class StateDelegate<T>(
|
||||
val komponent: Komponent,
|
||||
@@ -51,6 +51,6 @@ open class StateDelegate<T>(
|
||||
inline fun <reified T> Komponent.state(
|
||||
initialValue: T
|
||||
): Delegate<T> = StateDelegate(
|
||||
this,
|
||||
initialValue
|
||||
)
|
||||
this,
|
||||
initialValue
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user