On-Screen Logging

The chat below demonstrates how to display an on-screen log for debugging purposes. Every message sent to or received by the server is displayed in the log pane. The code is an expansion of the basic OrbiterMicro Chat Example. Note that in browsers that support the JavaScript console object, OrbiterMicro can also be instructed to log to the console via the Orbiter classes enableConsole() method.

[Edit Live on JSFiddle] [Download]

The Code

Here's the code for the chat, including all HTML, CSS, and JavaScript.