You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got the following error trying to get the value of an input:
message: "Attribute value is not yet defined for tag input"
Code:
importkotlinx.browser.documentimportkotlinx.html.divimportkotlinx.html.dom.appendimportkotlinx.html.h2importkotlinx.html.idimportkotlinx.html.inputimportkotlinx.html.js.onKeyUpFunctionimportkotlinx.html.styleimportkotlinx.html.unsafeimportorg.w3c.dom.HTMLElementobject HtmlIds {
constval base58Result ="base58-result"
}
/** * Test application for the base58 library. * * It helps test that the code works on a browser.*/funmain() {
byId("root").append {
h2 {
+"Enter some text:"
}
input {
placeholder ="Text to encode to base58"
onKeyUpFunction = { _ ->
byId(HtmlIds.base58Result).textContent = value
}
}
div {
id =HtmlIds.base58Result
style {
unsafe { raw("padding: 10px; background: green; color: white") }
}
}
}
}
privatefunbyId(id:String): HTMLElement {
return (document.getElementById(id) asHTMLElement?)!!
}
The text was updated successfully, but these errors were encountered:
Got the following error trying to get the
value
of aninput
:Code:
The text was updated successfully, but these errors were encountered: