Last active
June 12, 2018 15:11
-
-
Save ssougnez/61378202b96c23d8b6468af73aa26aa7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./assets/css/main.css" | |
const divMessages: HTMLDivElement = document.querySelector("#divMessages"); | |
const tbMessage: HTMLInputElement = document.querySelector("#tbMessage"); | |
const btnSend: HTMLButtonElement = document.querySelector("#btnSend"); | |
const username = new Date().getTime(); | |
tbMessage.addEventListener("keyup", (e: KeyboardEvent) => { | |
if (e.keyCode === 13) { | |
send(); | |
} | |
}); | |
btnSend.addEventListener("click", send); | |
function send() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment