[Laszlo-checkins] r10661 - openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml
bargull@openlaszlo.org
bargull at openlaszlo.org
Tue Aug 12 09:05:46 PDT 2008
Author: bargull
Date: 2008-08-12 09:05:43 -0700 (Tue, 12 Aug 2008)
New Revision: 10661
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
Log:
Change 20080811-bargull-FAg by bargull at dell--p4--2-53 on 2008-08-11 23:18:43
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: harmonize debugger output + add IE stuff
New Features:
Bugs Fixed: LPP-5033, LPP-5407
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Format display-results with "%#w" to show same output as in SWF (LPP-5033).
Don't "with (global)" to support Opera (LPP-5407) (I'm running with this fix since February without any problems)
IE fixes: - don't use 'HTMLElement' - it's not defined
- instead I'm using an IE-particularity: HTMLElements are objects (typeof returns 'object'), but they haven't got a constructor-property
- don't use 'Node' - it's not defined, too
- instead use the constant directly
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js 2008-08-12 16:02:40 UTC (rev 10660)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js 2008-08-12 16:05:43 UTC (rev 10661)
@@ -214,13 +214,15 @@
s = this.functionName(thing, false);
if (s == null) { s = ''; }
}
- } else if ((thing instanceof HTMLElement) &&
+ } else if ((!!window.HTMLElement ? thing instanceof HTMLElement : t == 'object' && !thing.constructor) &&
(! isNaN(Number(thing['nodeType'])))) {
+ // test for HTMLElement if avaliable, second expression helps to filter IE-HTMLElements
+
// tip o' the pin to osteele.com for the notation format
function nodeToString(node) {
var tn = node.nodeName || '';
var path = tn.toLowerCase();
- if (node.nodeType == Node.ELEMENT_NODE) {
+ if (node.nodeType == 1) {//Node.ELEMENT_NODE
var id = node.id;
var cn = node.className;
if (id) {
@@ -257,7 +259,8 @@
// No pretty if object.constructor.prototype is not
// object's prototype, as this indicates some sort of
// bizarre object
- if ((! thing.constructor.prototype.isPrototypeOf) ||
+ if ((! thing['constructor']) ||
+ (! thing.constructor.prototype.isPrototypeOf) ||
(! (thing.constructor.prototype.isPrototypeOf instanceof Function)) ||
(! thing.constructor.prototype.isPrototypeOf(thing))) {
pretty = (! unique);
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js 2008-08-12 16:02:40 UTC (rev 10660)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js 2008-08-12 16:05:43 UTC (rev 10661)
@@ -3,7 +3,7 @@
/**
* Runtime support for Debug
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -169,7 +169,7 @@
this.freshLine();
// Output any result from the evalloader
if (typeof(result) != 'undefined') {
- this.format("%w", result);
+ this.format("%#w", result);
}
this.freshPrompt();
}
@@ -199,11 +199,11 @@
this.freshPrompt();
this.addHTMLText('<span class="DEBUG">'+String(expr).toHTML()+"</span>\n");
try {
- with (global) {
+ //with (global) {
with (this.environment) {
- var value = eval(expr);
+ var value = window.eval(expr);
}
- }
+ //}
this.displayResult(value);
}
catch (e) {
More information about the Laszlo-checkins
mailing list