Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
fix minor bug with rendering of text()
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Sep 17, 2022
1 parent 14a72c8 commit 6b59491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ext {
}

group 'com.github.kwebio'
version '0.11.6'
version '0.12.1'

repositories {
mavenCentral()
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/kweb/Element.kt
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,13 @@ open class Element(
//language=JavaScript
val setTextJS = """document.getElementById({}).textContent = {};""".trimIndent()
when {
browser.isCatchingOutbound() != null -> {
callJsFunction(setTextJS, id.json, JsonPrimitive(value))
}
jsoupDoc != null -> {
val element = jsoupDoc.getElementById(this.id)
element!!.text(value)
}
browser.isCatchingOutbound() != null -> {
callJsFunction(setTextJS, id.json, JsonPrimitive(value))
}
else -> {
callJsFunction(setTextJS, id.json, JsonPrimitive(value))
}
Expand Down

0 comments on commit 6b59491

Please sign in to comment.