<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxLog"></a>mxLog</h1><divclass=CBody><p>A singleton class that implements a simple console.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxLog">mxLog</a></td><tdclass=SDescription>A singleton class that implements a simple console.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLog.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.consoleName">consoleName</a></td><tdclass=SDescription>Specifies the name of the console window. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxLog.TRACE">TRACE</a></td><tdclass=SDescription>Specified if the output for <ahref="#mxLog.enter"class=LFunctionid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">enter</a> and <ahref="#mxLog.leave"class=LFunctionid=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">leave</a> should be visible in the console. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.DEBUG">DEBUG</a></td><tdclass=SDescription>Specifies if the output for <ahref="#mxLog.debug"class=LFunctionid=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">debug</a> should be visible in the console. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxLog.WARN">WARN</a></td><tdclass=SDescription>Specifies if the output for <ahref="#mxLog.warn"class=LFunctionid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">warn</a> should be visible in the console. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.buffer">buffer</a></td><tdclass=SDescription>Buffer for pre-initialized content.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLog.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.init"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">init</a></td><tdclass=SDescription>Initializes the DOM node for the console. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLog.info"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">info</a></td><tdclass=SDescription>Writes the current navigator information to the console.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.addButton"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">addButton</a></td><tdclass=SDescription>Adds a button to the console using the given label and function.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLog.isVisible"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">isVisible</a></td><tdclass=SDescription>Returns true if the console is visible.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.show"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">show</a></td><tdclass=SDescription>Shows the console.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLog.setVisible"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">setVisible</a></td><tdclass=SDescription>Shows or hides the console.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.enter"id=link11onMouseOver="ShowTip(event, 'tt1', 'link11')"onMouseOut="HideTip('tt1')">enter</a></td><tdclass=SDescription>Writes the specified string to the console if <ahref="#mxLog.TRACE"class=LVariableid=link12onMouseOver="ShowTip(event, 'tt11', 'link12')"onMouseOut="HideTip('tt11')">TRACE</a> is true and returns the current time in milliseconds.</td></tr>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.consoleName"></a>consoleName</h3><divclass=CBody><p>Specifies the name of the console window. Default is ‘Console’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.TRACE"></a>TRACE</h3><divclass=CBody><p>Specified if the output for <ahref="#mxLog.enter"class=LFunctionid=link21onMouseOver="ShowTip(event, 'tt1', 'link21')"onMouseOut="HideTip('tt1')">enter</a> and <ahref="#mxLog.leave"class=LFunctionid=link22onMouseOver="ShowTip(event, 'tt2', 'link22')"onMouseOut="HideTip('tt2')">leave</a> should be visible in the console. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.DEBUG"></a>DEBUG</h3><divclass=CBody><p>Specifies if the output for <ahref="#mxLog.debug"class=LFunctionid=link23onMouseOver="ShowTip(event, 'tt3', 'link23')"onMouseOut="HideTip('tt3')">debug</a> should be visible in the console. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.WARN"></a>WARN</h3><divclass=CBody><p>Specifies if the output for <ahref="#mxLog.warn"class=LFunctionid=link24onMouseOver="ShowTip(event, 'tt4', 'link24')"onMouseOut="HideTip('tt4')">warn</a> should be visible in the console. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.buffer"></a>buffer</h3><divclass=CBody><p>Buffer for pre-initialized content.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.init"></a>init</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>init: function()</td></tr></table></blockquote><p>Initializes the DOM node for the console. This requires document.body to point to a non-null value. This is called from within <ahref="#mxLog.setVisible"class=LFunctionid=link25onMouseOver="ShowTip(event, 'tt10', 'link25')"onMouseOut="HideTip('tt10')">setVisible</a> if the log has not yet been initialized.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.info"></a>info</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>info: function()</td></tr></table></blockquote><p>Writes the current navigator information to the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.addButton"></a>addButton</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>addButton: function(</td><tdclass=PParameternowrap>lab,</td></tr><tr><td></td><tdclass=PParameternowrap>funct</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a button to the console using the given label and function.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.isVisible"></a>isVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>isVisible: function()</td></tr></table></blockquote><p>Returns true if the console is visible.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.show"></a>show</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>show: function()</td></tr></table></blockquote><p>Shows the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.setVisible"></a>setVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>setVisible: function(</td><tdclass=PParameternowrap>visible</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows or hides the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.enter"></a>enter</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>enter: function(</td><tdclass=PParameternowrap>string</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Writes the specified string to the console if <ahref="#mxLog.TRACE"class=LVariableid=link26onMouseOver="ShowTip(event, 'tt11', 'link26')"onMouseOut="HideTip('tt11')">TRACE</a> is true and returns the current time in milliseconds.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxLog.show();
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.leave"></a>leave</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>leave: function(</td><tdclass=PParameternowrap>string,</td></tr><tr><td></td><tdclass=PParameternowrap>t0</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Writes the specified string to the console if <ahref="#mxLog.TRACE"class=LVariableid=link27onMouseOver="ShowTip(event, 'tt11', 'link27')"onMouseOut="HideTip('tt11')">TRACE</a> is true and computes the difference between the current time and t0 in milliseconds. See <ahref="#mxLog.enter"class=LFunctionid=link28onMouseOver="ShowTip(event, 'tt1', 'link28')"onMouseOut="HideTip('tt1')">enter</a> for an example.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.debug"></a>debug</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>debug: function()</td></tr></table></blockquote><p>Adds all arguments to the console if <ahref="#mxLog.DEBUG"class=LVariableid=link29onMouseOver="ShowTip(event, 'tt12', 'link29')"onMouseOut="HideTip('tt12')">DEBUG</a> is enabled.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxLog.show();
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.warn"></a>warn</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>warn: function()</td></tr></table></blockquote><p>Adds all arguments to the console if <ahref="#mxLog.WARN"class=LVariableid=link30onMouseOver="ShowTip(event, 'tt13', 'link30')"onMouseOut="HideTip('tt13')">WARN</a> is enabled.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxLog.show();
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.write"></a>write</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>write: function()</td></tr></table></blockquote><p>Adds the specified strings to the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.writeln"></a>writeln</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>writeln: function()</td></tr></table></blockquote><p>Adds the specified strings to the console, appending a linefeed at the end of each string.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>enter: function(</td><tdclass=PParameternowrap>string</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Writes the specified string to the console if TRACE is true and returns the current time in milliseconds.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>leave: function(</td><tdclass=PParameternowrap>string,</td></tr><tr><td></td><tdclass=PParameternowrap>t0</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Writes the specified string to the console if TRACE is true and computes the difference between the current time and t0 in milliseconds. </div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>debug: function()</td></tr></table></blockquote>Adds all arguments to the console if DEBUG is enabled.</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>warn: function()</td></tr></table></blockquote>Adds all arguments to the console if WARN is enabled.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>init: function()</td></tr></table></blockquote>Initializes the DOM node for the console. </div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>info: function()</td></tr></table></blockquote>Writes the current navigator information to the console.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>addButton: function(</td><tdclass=PParameternowrap>lab,</td></tr><tr><td></td><tdclass=PParameternowrap>funct</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Adds a button to the console using the given label and function.</div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>isVisible: function()</td></tr></table></blockquote>Returns true if the console is visible.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>show: function()</td></tr></table></blockquote>Shows the console.</div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>setVisible: function(</td><tdclass=PParameternowrap>visible</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Shows or hides the console.</div></div><divclass=CToolTipid="tt11"><divclass=CVariable>Specified if the output for enter and leave should be visible in the console. </div></div><divclass=CToolTipid="tt12"><divclass=CVariable>Specifies if the output for debug should be visible in the console. </div></div><divclass=CToolTipid="tt13"><divclass=CVariable>Specifies if the output for warn should be visible in the console. </div></div><divclass=CToolTipid="tt14"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>write: function()</td></tr></table></blockquote>Adds the specified strings to