This page was imported from my old Wordpress Blog (which I stopped updating in 2011) and are here mainly for posterity. Although I have tried to clean things up there will be broken links and potentially other issues.
alert() calls to give you feedback on how the script is executing, this is especially useful in browsers that supply vague and un-helpful information about errors (or even their exact location), but can soon become counter productive - confirming multiple alert boxes breaks the code, test, code flow. This script creates a console to send messages to, where you would have traditionally used
Include the script:
void::void -> Hello world! void::doHelloWorld -> Hello world! HelloWorld::doHelloWorld -> Hello world!
When the console is created the
debug.css stylesheet is included by adding a
<link /> element to the
head of the document.
The messages are added to the console with the following structure:
<span class="className">className</span>::<span class="methodName">methodName</span> -> <span class="msg">msg</span><br />
When a message is added to the console a class name of
notify is added to the console wrapper element (