SimpleChat: Rather value wrt input text element
This commit is contained in:
parent
24d348ab97
commit
256e02c7c9
1 changed files with 2 additions and 2 deletions
|
@ -64,14 +64,14 @@ function startme() {
|
|||
|
||||
let divChat = /** @type{HTMLDivElement} */(document.getElementById("chat"));
|
||||
let btnSubmit = document.getElementById("submit");
|
||||
let inputUser = document.getElementById("user");
|
||||
let inputUser = /** @type{HTMLInputElement} */(document.getElementById("user"));
|
||||
|
||||
if (divChat == null) {
|
||||
throw Error("ERRR:StartMe:Chat element missing");
|
||||
}
|
||||
|
||||
btnSubmit?.addEventListener("click", (ev)=>{
|
||||
let content = inputUser?.textContent;
|
||||
let content = inputUser?.value;
|
||||
console.debug("DBUG:BtnSubmit:Click:", content)
|
||||
gChat.add(Roles.User, content);
|
||||
gChat.show(divChat);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue