~starkingdoms/starkingdoms

ref: ccb7ac1036a620f213bb5d24a3332091074e3667 starkingdoms/starkingdoms-client/src/chat.ts -rw-r--r-- 245 bytes
ccb7ac10 — ghostlyzsh Merge branch 'bevy_rewrite' of https://gitlab.com/starkingdoms.tk/starkingdoms.tk into bevy_rewrite 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);
}