diff --git a/src/jsMain/kotlin/HTMLInputHelpers.kt b/src/jsMain/kotlin/HTMLInputHelpers.kt
index e2bb325..3302f40 100644
--- a/src/jsMain/kotlin/HTMLInputHelpers.kt
+++ b/src/jsMain/kotlin/HTMLInputHelpers.kt
@@ -6,11 +6,11 @@ import kotlin.reflect.KProperty
fun getInputElem(s: String): HTMLInputElement =
document.getElementById(s) as HTMLInputElement
-class HTMLInputProperty(private val input: HTMLInputElement): ReadOnlyProperty {
- override fun getValue(thisRef: T, property: KProperty<*>): Double = input.valueAsNumber
+class HTMLInputProperty(private val input: HTMLInputElement): ReadOnlyProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Double = input.valueAsNumber
}
-fun HTMLInputProperty(s: String): HTMLInputProperty {
+fun HTMLInputProperty(s: String): HTMLInputProperty {
val elem = getInputElem(s)
return HTMLInputProperty(elem)
}
diff --git a/src/jsMain/kotlin/ResourceLoader.kt b/src/jsMain/kotlin/ResourceLoader.kt
index e7aadfb..ff89cba 100644
--- a/src/jsMain/kotlin/ResourceLoader.kt
+++ b/src/jsMain/kotlin/ResourceLoader.kt
@@ -10,7 +10,7 @@ class ResourceLoader(vararg resourceLocations: String) {
private val fetchParams = RequestInit(method = "GET", cache = RequestCache.NO_STORE, mode = RequestMode.SAME_ORIGIN)
init {
for (loc in resourceLocations) {
- resourceMap.put(loc, ResourceInfo())
+ resourceMap[loc] = ResourceInfo()
makeRequest(loc)
}
}