Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created September 25, 2022 16:42
Show Gist options
  • Save percybolmer/87c090a1067f173237a6e8745fafc4df to your computer and use it in GitHub Desktop.
Save percybolmer/87c090a1067f173237a6e8745fafc4df to your computer and use it in GitHub Desktop.
/**
* sendMessage will send a new message onto the Chat
* */
function sendMessage() {
var newmessage = document.getElementById("message");
if (newmessage != null) {
let outgoingEvent = new SendMessageEvent(newmessage.value, "percy");
sendEvent("send_message", outgoingEvent)
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment