|
What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
// xbDebug.js revision: 0.003 2002-02-26
/* ***** BEGIN LICENSE BLOCK *****
* Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
* Full Terms at /xbProjects-srce/license/mpl-tri-license.txt
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Netscape code.
*
* The Initial Developer of the Original Code is
* Netscape Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Bob Clary <bclary@netscape.com>
*
* ***** END LICENSE BLOCK ***** */
/*
ChangeLog:
2002-02-25: bclary - modified xbDebugTraceOject to make sure
that original versions of wrapped functions were not
rewrapped. This had caused an infinite loop in IE.
2002-02-07: bclary - modified xbDebug.prototype.close to not null
the debug window reference. This can cause problems with
Internet Explorer if the page is refreshed. These issues will
be addressed at a later date.
*/
function xbDebug()
{
this.on = false;
this.stack = new Array();
this.debugwindow = null;
this.execprofile = new Object();
}
xbDebug.prototype.push = function ()
{
this.stack[this.stack.length] = this.on;
this.on = true;
}
xbDebug.prototype.pop = function ()
{
this.on = this.stack[this.stack.length - 1];
--this.stack.length;
}
xbDebug.prototype.open = function ()
{
if (this.debugwindow && !this.debugwindow.closed)
this.close();
this.debugwindow = window.open('about:blank', 'DEBUGWINDOW', 'height=400,width=600,resizable=yes,scrollbars=yes');
this.debugwindow.title = 'xbDebug Window';
this.debugwindow.document.write('<html>xbDebug WindowJavascript Debug Window |