~starkingdoms/starkingdoms

ref: 6c682ed1c424ff7057e9afa33065318a4569b347 starkingdoms/starkingdoms-client/src/chat.ts -rw-r--r-- 245 bytes
6c682ed1 — core fully restructure the client 2 years ago
                                                                                
1
2
3
4
5
6
7
export function addMessage(classname: string, message: string) {
  let p = document.createElement("p");
  p.innerText = message;
  p.classList.add("message");
  p.classList.add(classname);
  document.getElementById("chatbox")!.appendChild(p);
}