[Pkg-javascript-commits] [dojo] 87/149: remove vestigial firebug lite code, fixes #18727
David Prévot
taffit at moszumanska.debian.org
Sat Feb 27 03:13:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository dojo.
commit 0d8a9073fce7f8305bdc367b6d20995ebc92a5b3
Author: Bill Keese <bill at dojotoolkit.org>
Date: Mon Oct 5 10:44:21 2015 +0900
remove vestigial firebug lite code, fixes #18727
---
_base/config.js | 15 +-
_firebug/LICENSE | 37 --
_firebug/errorIcon.png | Bin 457 -> 0 bytes
_firebug/firebug.css | 211 -------
_firebug/firebug.js | 1163 +----------------------------------
_firebug/infoIcon.png | Bin 524 -> 0 bytes
_firebug/tab_lft_norm.png | Bin 193 -> 0 bytes
_firebug/tab_lft_over.png | Bin 196 -> 0 bytes
_firebug/tab_rgt_norm.png | Bin 208 -> 0 bytes
_firebug/tab_rgt_over.png | Bin 208 -> 0 bytes
_firebug/warningIcon.png | Bin 516 -> 0 bytes
main.js | 6 +-
robotx.js | 9 +-
testsDOH/_base/html_element.html | 12 +-
testsDOH/test_FirebugLite.html | 101 ---
testsDOH/test_FirebugLitePopup.html | 102 ---
16 files changed, 12 insertions(+), 1644 deletions(-)
diff --git a/_base/config.js b/_base/config.js
index 4c3b085..56b71f4 100644
--- a/_base/config.js
+++ b/_base/config.js
@@ -37,14 +37,7 @@ return {
// isDebug: Boolean
// Defaults to `false`. If set to `true`, ensures that Dojo provides
- // extended debugging feedback via Firebug. If Firebug is not available
- // on your platform, setting `isDebug` to `true` will force Dojo to
- // pull in (and display) the version of Firebug Lite which is
- // integrated into the Dojo distribution, thereby always providing a
- // debugging/logging console when `isDebug` is enabled. Note that
- // Firebug's `console.*` methods are ALWAYS defined by Dojo. If
- // `isDebug` is false and you are on a platform without Firebug, these
- // methods will be defined as no-ops.
+ // extended debugging feedback to the console.
isDebug: false,
// locale: String
@@ -122,12 +115,6 @@ return {
// of topics that are published.
ioPublish: false,
- // useCustomLogger: Anything?
- // If set to a value that evaluates to true such as a string or array and
- // isDebug is true and Firebug is not available or running, then it bypasses
- // the creation of Firebug Lite allowing you to define your own console object.
- useCustomLogger: undefined,
-
// transparentColor: Array
// Array containing the r, g, b components used as transparent color in dojo.Color;
// if undefined, [255,255,255] (white) will be used.
diff --git a/_firebug/LICENSE b/_firebug/LICENSE
deleted file mode 100644
index 8c777a2..0000000
--- a/_firebug/LICENSE
+++ /dev/null
@@ -1,37 +0,0 @@
-License Disclaimer:
-
-All contents of this directory are Copyright (c) the Dojo Foundation, with the
-following exceptions:
--------------------------------------------------------------------------------
-
-firebug.html, firebug.js, errIcon.png, infoIcon.png, warningIcon.png:
- * Copyright (c) 2006-2007, Joe Hewitt, All rights reserved.
- Distributed under the terms of the BSD License (see below)
-
--------------------------------------------------------------------------------
-
-Copyright (c) 2006-2007, Joe Hewitt
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- * Neither the name of the Dojo Foundation nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/_firebug/errorIcon.png b/_firebug/errorIcon.png
deleted file mode 100644
index 2d75261..0000000
Binary files a/_firebug/errorIcon.png and /dev/null differ
diff --git a/_firebug/firebug.css b/_firebug/firebug.css
deleted file mode 100644
index 2012e06..0000000
--- a/_firebug/firebug.css
+++ /dev/null
@@ -1,211 +0,0 @@
-.firebug {
- margin: 0;
- background:#fff;
- font-family: Lucida Grande, Tahoma, sans-serif;
- font-size: 11px;
- overflow: hidden;
- border: 1px solid black;
- position: relative;
-}
-.firebug a {
- text-decoration: none;
-}
-.firebug a:hover {
- text-decoration: underline;
-}
-.firebug a:visited{
- color:#0000FF;
-}
-.firebug #firebugToolbar {
- height: 18px;
- line-height:18px;
- border-top: 1px solid ThreeDHighlight;
- border-bottom: 1px solid ThreeDShadow;
- padding: 2px 6px;
-
- background:#f0f0f0;
-}
-
-.firebug #firebugLog, .firebug #objectLog {
- overflow: auto;
- position: absolute;
- left: 0;
- width: 100%;
-}
-#objectLog{
- overflow:scroll;
- height:258px;
-}
-.firebug #firebugCommandLine {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 18px;
- border: none;
- border-top: 1px solid ThreeDShadow;
-}
-.firebug .logRow {
- position: relative;
- border-bottom: 1px solid #D7D7D7;
- padding: 2px 4px 1px 6px;
- background-color: #FFFFFF;
-}
-.firebug .logRow-command {
- font-family: Monaco, monospace;
- color: blue;
-}
-.firebug .objectBox-null {
- padding: 0 2px;
- border: 1px solid #666666;
- background-color: #888888;
- color: #FFFFFF;
-}
-.firebug .objectBox-string {
- font-family: Monaco, monospace;
- color: red;
- white-space: pre;
-}
-.firebug .objectBox-number {
- color: #000088;
-}
-.firebug .objectBox-function {
- font-family: Monaco, monospace;
- color: DarkGreen;
-}
-.firebug .objectBox-object {
- color: DarkGreen;
- font-weight: bold;
-}
-.firebug .logRow-info,
-.firebug .logRow-error,
-.firebug .logRow-warning
- {
- background: #00FFFF no-repeat 2px 2px;
- padding-left: 20px;
- padding-bottom: 3px;
-}
-.firebug .logRow-info {
- background: #FFF url(infoIcon.png) no-repeat 2px 2px;
- padding-left: 20px;
- padding-bottom: 3px;
-}
-.firebug .logRow-warning {
-
- background: #00FFFF url(warningIcon.png) no-repeat 2px 2px;
- padding-left: 20px;
- padding-bottom: 3px;
-}
-.firebug .logRow-error {
- background: LightYellow url(errorIcon.png) no-repeat 2px 2px;
- padding-left: 20px;
- padding-bottom: 3px;
-}
-.firebug .errorMessage {
- vertical-align: top;
- color: #FF0000;
-}
-.firebug .objectBox-sourceLink {
- position: absolute;
- right: 4px;
- top: 2px;
- padding-left: 8px;
- font-family: Lucida Grande, sans-serif;
- font-weight: bold;
- color: #0000FF;
-}
-.firebug .logRow-group {
- background: #EEEEEE;
- border-bottom: none;
-}
-.firebug .logGroup {
- background: #EEEEEE;
-}
-.firebug .logGroupBox {
- margin-left: 24px;
- border-top: 1px solid #D7D7D7;
- border-left: 1px solid #D7D7D7;
-}
-.firebug .selectorTag,
-.firebug .selectorId,
-.firebug .selectorClass {
- font-family: Monaco, monospace;
- font-weight: normal;
-}
-.firebug .selectorTag {
- color: #0000FF;
-}
-.firebug .selectorId {
- color: DarkBlue;
-}
-.firebug .selectorClass {
- color: red;
-}
-.firebug .objectBox-element {
- font-family: Monaco, monospace;
- color: #000088;
-}
-.firebug .nodeChildren {
- margin-left: 16px;
-}
-.firebug .nodeTag {
- color: blue;
-}
-.firebug .nodeValue {
- color: #FF0000;
- font-weight: normal;
-}
-.firebug .nodeText,
-.firebug .nodeComment {
- margin: 0 2px;
- vertical-align: top;
-}
-.firebug .nodeText {
- color: #333333;
-}
-.firebug .nodeComment {
- color: DarkGreen;
-}
-.firebug .propertyNameCell {
- vertical-align: top;
-}
-.firebug .propertyName {
- font-weight: bold;
-}
-
-/* tabs */
-#firebugToolbar ul.tabs{
- margin:0 !important;
- padding:0;
-}
-#firebugToolbar ul.tabs li{
- list-style:none;
- background:transparent url(tab_lft_norm.png) no-repeat left;
- line-height:18px;
- float:left;
- margin-left:5px;
-}
-#firebugToolbar ul.tabs li.right{
- float:right;
- margin-right:5px;
- margin-left:0;
-}
-#firebugToolbar ul.tabs li.gap{
- margin-left:20px;
-}
-#firebugToolbar .tabs a{
- text-decoration:none;
- background:transparent url(tab_rgt_norm.png) no-repeat right;
- line-height:18px;
- padding:3px 9px 4px 0px;
- margin-left:9px;
- color:#333333;
-}
-#firebugToolbar .tabs li:hover{
- background:transparent url(tab_lft_over.png) no-repeat left;
-}
-#firebugToolbar .tabs a:hover{
- text-decoration:none;
- background:transparent url(tab_rgt_over.png) no-repeat right;
- color:#FFFFFF;
-}
diff --git a/_firebug/firebug.js b/_firebug/firebug.js
index 3e16038..66a8853 100644
--- a/_firebug/firebug.js
+++ b/_firebug/firebug.js
@@ -1,42 +1,10 @@
-define([
- "../_base/kernel",
- "require",
- "../_base/html",
- "../sniff",
- "../_base/array",
- "../_base/lang",
- "../_base/event",
- "../_base/unload"], function(dojo, require, html, has){
+define([], function(){
// module:
// dojo/_firebug/firebug
// summary:
- // Firebug Lite, the baby brother to Joe Hewitt's Firebug for Mozilla Firefox
- // description:
- // Opens a console for logging, debugging, and error messages.
- // Contains partial functionality to Firebug. See function list below.
- //
- // NOTE:
- // Firebug is a Firefox extension created by Joe Hewitt (see license). You do not need Dojo to run Firebug.
- // Firebug Lite is included in Dojo by permission from Joe Hewitt
- // If you are new to Firebug, or used to the Dojo 0.4 dojo.debug, you can learn Firebug
- // functionality by reading the function comments below or visiting http://www.getfirebug.com/docs.html
- //
- // NOTE:
- // To test Firebug Lite in Firefox:
- //
- // - FF2: set "console = null" before loading dojo and set djConfig.isDebug=true
- // - FF3: disable Firebug and set djConfig.isDebug=true
- //
- // example:
- // Supports inline objects in object inspector window (only simple trace of dom nodes, however)
- // | console.log("my object", {foo:"bar"})
- // example:
- // Option for console to open in popup window
- // | var djConfig = {isDebug: true, popup:true };
- // example:
- // Option for console height (ignored for popup)
- // | var djConfig = {isDebug: true, debugHeight:100 }
+ // This file used to contain code for a "firebug lite" console. Now it just fixes IE's console.log()
+ // command to insert spaces.
var isNewIE = (/Trident/.test(window.navigator.userAgent));
@@ -64,1128 +32,7 @@ define([
try{ console.clear(); }catch(e){}
}
- if(
- has("ff") || // Firefox has Firebug
- has("chrome") || // Chrome 3+ has a console
- has("safari") || // Safari 4 has a console
- isNewIE || // Has the new IE console
- window.firebug || // Testing for mozilla firebug lite
- (typeof console != "undefined" && console.firebug) || //The firebug console
- dojo.config.useCustomLogger || // Allow custom loggers
- has("air") // isDebug triggers AIRInsector, not Firebug
- ){
- return;
- }
-
- // don't build firebug in iframes
- try{
- if(window != window.parent){
- // but if we've got a parent logger, connect to it
- if(window.parent["console"]){
- window.console = window.parent.console;
- }
- return;
- }
- }catch(e){/*squelch*/}
-
- // ***************************************************************************
- // Placing these variables before the functions that use them to avoid a
- // shrinksafe bug where variable renaming does not happen correctly otherwise.
-
- // most of the objects in this script are run anonomously
- var _firebugDoc = document;
- var _firebugWin = window;
- var __consoleAnchorId__ = 0;
-
- var consoleFrame = null;
- var consoleBody = null;
- var consoleObjectInspector = null;
- var fireBugTabs = null;
- var commandLine = null;
- var consoleToolbar = null;
-
- var frameVisible = false;
- var messageQueue = [];
- var groupStack = [];
- var timeMap = {};
- var countMap = {};
-
- var consoleDomInspector = null;
- var _inspectionMoveConnection;
- var _inspectionClickConnection;
- var _inspectionEnabled = false;
- var _inspectionTimer = null;
- var _inspectTempNode = document.createElement("div");
-
-
- var _inspectCurrentNode;
- var _restoreBorderStyle;
-
- // ***************************************************************************
-
- window.console = {
- _connects: [],
- log: function(){
- // summary:
- // Sends arguments to console.
- logFormatted(arguments, "");
- },
-
- debug: function(){
- // summary:
- // Sends arguments to console. Missing finctionality to show script line of trace.
- logFormatted(arguments, "debug");
- },
-
- info: function(){
- // summary:
- // Sends arguments to console, highlighted with (I) icon.
- logFormatted(arguments, "info");
- },
-
- warn: function(){
- // summary:
- // Sends warning arguments to console, highlighted with (!) icon and blue style.
- logFormatted(arguments, "warning");
- },
-
- error: function(){
- // summary:
- // Sends error arguments (object) to console, highlighted with (X) icon and yellow style
- // NEW: error object now displays in object inspector
- logFormatted(arguments, "error");
- },
-
- assert: function(truth, message){
- // summary:
- // Tests for true. Throws exception if false.
- if(!truth){
- var args = [];
- for(var i = 1; i < arguments.length; ++i){
- args.push(arguments[i]);
- }
-
- logFormatted(args.length ? args : ["Assertion Failure"], "error");
- throw message ? message : "Assertion Failure";
- }
- },
-
- dir: function(obj){
- var str = printObject( obj );
- str = str.replace(/\n/g, "<br />");
- str = str.replace(/\t/g, " ");
- logRow([str], "dir");
- },
-
- dirxml: function(node){
- var html = [];
- appendNode(node, html);
- logRow(html, "dirxml");
- },
-
- group: function(){
- // summary:
- // collects log messages into a group, starting with this call and ending with
- // groupEnd(). Missing collapse functionality
- logRow(arguments, "group", pushGroup);
- },
-
- groupEnd: function(){
- // summary:
- // Closes group. See above
- logRow(arguments, "", popGroup);
- },
-
- time: function(name){
- // summary:
- // Starts timers assigned to name given in argument. Timer stops and displays on timeEnd(title);
- // example:
- // | console.time("load");
- // | console.time("myFunction");
- // | console.timeEnd("load");
- // | console.timeEnd("myFunction");
- timeMap[name] = new Date().getTime();
- },
-
- timeEnd: function(name){
- // summary:
- // See above.
- if(name in timeMap){
- var delta = (new Date()).getTime() - timeMap[name];
- logFormatted([name+ ":", delta+"ms"]);
- delete timeMap[name];
- }
- },
-
- count: function(name){
- // summary:
- // Not supported
- if(!countMap[name]) countMap[name] = 0;
- countMap[name]++;
- logFormatted([name+": "+countMap[name]]);
- },
-
- trace: function(_value){
- var stackAmt = _value || 3;
- var f = console.trace.caller; //function that called trace
- console.log(">>> console.trace(stack)");
- for(var i=0;i<stackAmt;i++){
- var func = f.toString();
- var args=[];
- for (var a = 0; a < f.arguments.length; a++){
- args.push(f.arguments[a]);
- }
- if(f.arguments.length){
- console.dir({"function":func, "arguments":args});
- }else{
- console.dir({"function":func});
- }
-
- f = f.caller;
- }
- },
-
- profile: function(){
- // summary:
- // Not supported
- this.warn(["profile() not supported."]);
- },
-
- profileEnd: function(){ },
-
- clear: function(){
- // summary:
- // Clears message console. Do not call this directly
- if(consoleBody){
- while(consoleBody.childNodes.length){
- dojo.destroy(consoleBody.firstChild);
- }
- }
- dojo.forEach(this._connects,dojo.disconnect);
- },
-
- open: function(){
- // summary:
- // Opens message console. Do not call this directly
- toggleConsole(true);
- },
-
- close: function(){
- // summary:
- // Closes message console. Do not call this directly
- if(frameVisible){
- toggleConsole();
- }
- },
- _restoreBorder: function(){
- if(_inspectCurrentNode){
- _inspectCurrentNode.style.border = _restoreBorderStyle;
- }
- },
- openDomInspector: function(){
- _inspectionEnabled = true;
- consoleBody.style.display = "none";
- consoleDomInspector.style.display = "block";
- consoleObjectInspector.style.display = "none";
- document.body.style.cursor = "pointer";
- _inspectionMoveConnection = dojo.connect(document, "mousemove", function(evt){
- if(!_inspectionEnabled){ return; }
- if(!_inspectionTimer){
- _inspectionTimer = setTimeout(function(){ _inspectionTimer = null; }, 50);
- }else{
- return;
- }
- var node = evt.target;
- if(node && (_inspectCurrentNode !== node)){
- var parent = true;
-
- console._restoreBorder();
- var html = [];
- appendNode(node, html);
- consoleDomInspector.innerHTML = html.join("");
-
- _inspectCurrentNode = node;
- _restoreBorderStyle = _inspectCurrentNode.style.border;
- _inspectCurrentNode.style.border = "#0000FF 1px solid";
- }
- });
- setTimeout(function(){
- _inspectionClickConnection = dojo.connect(document, "click", function(evt){
- document.body.style.cursor = "";
- _inspectionEnabled = !_inspectionEnabled;
- dojo.disconnect(_inspectionClickConnection);
- // console._restoreBorder();
- });
- }, 30);
- },
- _closeDomInspector: function(){
- document.body.style.cursor = "";
- dojo.disconnect(_inspectionMoveConnection);
- dojo.disconnect(_inspectionClickConnection);
- _inspectionEnabled = false;
- console._restoreBorder();
- },
- openConsole:function(){
- // summary:
- // Closes object inspector and opens message console. Do not call this directly
- consoleBody.style.display = "block";
- consoleDomInspector.style.display = "none";
- consoleObjectInspector.style.display = "none";
- console._closeDomInspector();
- },
- openObjectInspector:function(){
- consoleBody.style.display = "none";
- consoleDomInspector.style.display = "none";
- consoleObjectInspector.style.display = "block";
- console._closeDomInspector();
- },
- recss: function(){
- // this is placed in dojo since the console is most likely
- // in another window and dojo is easily accessible
- var i,a,s;a=document.getElementsByTagName('link');
- for(i=0;i<a.length;i++){
- s=a[i];
- if(s.rel.toLowerCase().indexOf('stylesheet')>=0&&s.href){
- var h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');
- s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+new Date().valueOf();
- }
- }
- }
- };
-
- // ***************************************************************************
-
- function toggleConsole(forceOpen){
- frameVisible = forceOpen || !frameVisible;
- if(consoleFrame){
- consoleFrame.style.display = frameVisible ? "block" : "none";
- }
- }
-
- function focusCommandLine(){
- toggleConsole(true);
- if(commandLine){
- commandLine.focus();
- }
- }
-
- function openWin(x,y,w,h){
- var win = window.open("","_firebug","status=0,menubar=0,resizable=1,top="+y+",left="+x+",width="+w+",height="+h+",scrollbars=1,addressbar=0");
- if(!win){
- var msg = "Firebug Lite could not open a pop-up window, most likely because of a blocker.\n" +
- "Either enable pop-ups for this domain, or change the djConfig to popup=false.";
- alert(msg);
- }
- createResizeHandler(win);
- var newDoc=win.document;
- //Safari needs an HTML height
- var HTMLstring= '<html style="height:100%;"><head><title>Firebug Lite</title></head>\n' +
- '<body bgColor="#ccc" style="height:97%;" onresize="opener.onFirebugResize()">\n' +
- '<div id="fb"></div>' +
- '</body></html>';
-
- newDoc.write(HTMLstring);
- newDoc.close();
- return win;
- }
-
- function createResizeHandler(wn){
- // summary:
- // Creates handle for onresize window. Called from script in popup's body tag (so that it will work with IE).
- //
-
- var d = new Date();
- d.setTime(d.getTime()+(60*24*60*60*1000)); // 60 days
- d = d.toUTCString();
-
- var dc = wn.document,
- getViewport;
-
- if (wn.innerWidth){
- getViewport = function(){
- return{w:wn.innerWidth, h:wn.innerHeight};
- };
- }else if (dc.documentElement && dc.documentElement.clientWidth){
- getViewport = function(){
- return{w:dc.documentElement.clientWidth, h:dc.documentElement.clientHeight};
- };
- }else if (dc.body){
- getViewport = function(){
- return{w:dc.body.clientWidth, h:dc.body.clientHeight};
- };
- }
-
-
- window.onFirebugResize = function(){
-
- //resize the height of the console log body
- layout(getViewport().h);
-
- clearInterval(wn._firebugWin_resize);
- wn._firebugWin_resize = setTimeout(function(){
- var x = wn.screenLeft,
- y = wn.screenTop,
- w = wn.outerWidth || wn.document.body.offsetWidth,
- h = wn.outerHeight || wn.document.body.offsetHeight;
-
- document.cookie = "_firebugPosition=" + [x,y,w,h].join(",") + "; expires="+d+"; path=/";
-
- }, 5000); //can't capture window.onMove - long timeout gives better chance of capturing a resize, then the move
-
- };
- }
-
-
- /*****************************************************************************/
-
-
- function createFrame(){
- if(consoleFrame){
- return;
- }
- toggleConsole(true);
- if(dojo.config.popup){
- var containerHeight = "100%";
- var cookieMatch = document.cookie.match(/(?:^|; )_firebugPosition=([^;]*)/);
- var p = cookieMatch ? cookieMatch[1].split(",") : [2,2,320,480];
-
- _firebugWin = openWin(p[0],p[1],p[2],p[3]); // global
- _firebugDoc = _firebugWin.document; // global
-
- dojo.config.debugContainerId = 'fb';
-
- // connecting popup
- _firebugWin.console = window.console;
- _firebugWin.dojo = window.dojo;
- }else{
- _firebugDoc = document;
- containerHeight = (dojo.config.debugHeight || 300) + "px";
- }
-
- var styleElement = _firebugDoc.createElement("link");
- styleElement.href = require.toUrl("./firebug.css");
- styleElement.rel = "stylesheet";
- styleElement.type = "text/css";
- var styleParent = _firebugDoc.getElementsByTagName("head");
- if(styleParent){
- styleParent = styleParent[0];
- }
- if(!styleParent){
- styleParent = _firebugDoc.getElementsByTagName("html")[0];
- }
- if(has("ie")){
- window.setTimeout(function(){ styleParent.appendChild(styleElement); }, 0);
- }else{
- styleParent.appendChild(styleElement);
- }
-
- if(dojo.config.debugContainerId){
- consoleFrame = _firebugDoc.getElementById(dojo.config.debugContainerId);
- }
- if(!consoleFrame){
- consoleFrame = _firebugDoc.createElement("div");
- _firebugDoc.body.appendChild(consoleFrame);
- }
- consoleFrame.className += " firebug";
- consoleFrame.id = "firebug";
- consoleFrame.style.height = containerHeight;
- consoleFrame.style.display = (frameVisible ? "block" : "none");
-
- var buildLink = function(label, title, method, _class){
- return '<li class="'+_class+'"><a href="javascript:void(0);" onclick="console.'+ method +'(); return false;" title="'+title+'">'+label+'</a></li>';
- };
- consoleFrame.innerHTML =
- '<div id="firebugToolbar">'
- + ' <ul id="fireBugTabs" class="tabs">'
-
- + buildLink("Clear", "Remove All Console Logs", "clear", "")
- + buildLink("ReCSS", "Refresh CSS without reloading page", "recss", "")
-
- + buildLink("Console", "Show Console Logs", "openConsole", "gap")
- + buildLink("DOM", "Show DOM Inspector", "openDomInspector", "")
- + buildLink("Object", "Show Object Inspector", "openObjectInspector", "")
- + ((dojo.config.popup) ? "" : buildLink("Close", "Close the console", "close", "gap"))
-
- + ' </ul>'
- + '</div>'
- + '<input type="text" id="firebugCommandLine" />'
- + '<div id="firebugLog"></div>'
- + '<div id="objectLog" style="display:none;">Click on an object in the Log display</div>'
- + '<div id="domInspect" style="display:none;">Hover over HTML elements in the main page. Click to hold selection.</div>';
-
-
- consoleToolbar = _firebugDoc.getElementById("firebugToolbar");
-
- commandLine = _firebugDoc.getElementById("firebugCommandLine");
- addEvent(commandLine, "keydown", onCommandLineKeyDown);
-
- addEvent(_firebugDoc, has("ie") || has("safari") ? "keydown" : "keypress", onKeyDown);
-
- consoleBody = _firebugDoc.getElementById("firebugLog");
- consoleObjectInspector = _firebugDoc.getElementById("objectLog");
- consoleDomInspector = _firebugDoc.getElementById("domInspect");
- fireBugTabs = _firebugDoc.getElementById("fireBugTabs");
- layout();
- flush();
- }
-
- dojo.addOnLoad(createFrame);
-
- function clearFrame(){
- _firebugDoc = null;
-
- if(_firebugWin.console){
- _firebugWin.console.clear();
- }
- _firebugWin = null;
- consoleFrame = null;
- consoleBody = null;
- consoleObjectInspector = null;
- consoleDomInspector = null;
- commandLine = null;
- messageQueue = [];
- groupStack = [];
- timeMap = {};
- }
-
-
- function evalCommandLine(){
- var text = commandLine.value;
- commandLine.value = "";
-
- logRow(["> ", text], "command");
-
- var value;
- try{
- value = eval(text);
- }catch(e){
- console.debug(e); // put exception on the console
- }
-
- console.log(value);
- }
-
- function layout(h){
- var tHeight = 25; //consoleToolbar.offsetHeight; // tab style not ready on load - throws off layout
- var height = h ?
- h - (tHeight + commandLine.offsetHeight +25 + (h*.01)) + "px" :
- (consoleFrame.offsetHeight - tHeight - commandLine.offsetHeight) + "px";
-
- consoleBody.style.top = tHeight + "px";
- consoleBody.style.height = height;
- consoleObjectInspector.style.height = height;
- consoleObjectInspector.style.top = tHeight + "px";
- consoleDomInspector.style.height = height;
- consoleDomInspector.style.top = tHeight + "px";
- commandLine.style.bottom = 0;
-
- dojo.addOnWindowUnload(clearFrame);
- }
-
- function logRow(message, className, handler){
- if(consoleBody){
- writeMessage(message, className, handler);
- }else{
- messageQueue.push([message, className, handler]);
- }
- }
-
- function flush(){
- var queue = messageQueue;
- messageQueue = [];
-
- for(var i = 0; i < queue.length; ++i){
- writeMessage(queue[i][0], queue[i][1], queue[i][2]);
- }
- }
-
- function writeMessage(message, className, handler){
- var isScrolledToBottom =
- consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight;
-
- handler = handler||writeRow;
-
- handler(message, className);
-
- if(isScrolledToBottom){
- consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight;
- }
- }
-
- function appendRow(row){
- var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody;
- container.appendChild(row);
- }
-
- function writeRow(message, className){
- var row = consoleBody.ownerDocument.createElement("div");
- row.className = "logRow" + (className ? " logRow-"+className : "");
- row.innerHTML = message.join("");
- appendRow(row);
- }
-
- function pushGroup(message, className){
- logFormatted(message, className);
-
- //var groupRow = consoleBody.ownerDocument.createElement("div");
- //groupRow.className = "logGroup";
- var groupRowBox = consoleBody.ownerDocument.createElement("div");
- groupRowBox.className = "logGroupBox";
- //groupRow.appendChild(groupRowBox);
- appendRow(groupRowBox);
- groupStack.push(groupRowBox);
- }
-
- function popGroup(){
- groupStack.pop();
- }
-
- // ***************************************************************************
-
- function logFormatted(objects, className){
- var html = [];
-
- var format = objects[0];
- var objIndex = 0;
-
- if(typeof(format) != "string"){
- format = "";
- objIndex = -1;
- }
-
- var parts = parseFormat(format);
-
- for(var i = 0; i < parts.length; ++i){
- var part = parts[i];
- if(part && typeof part == "object"){
- part.appender(objects[++objIndex], html);
- }else{
- appendText(part, html);
- }
- }
-
-
- var ids = [];
- var obs = [];
- for(i = objIndex+1; i < objects.length; ++i){
- appendText(" ", html);
-
- var object = objects[i];
- if(object === undefined || object === null ){
- appendNull(object, html);
-
- }else if(typeof(object) == "string"){
- appendText(object, html);
-
- }else if(object instanceof Date){
- appendText(object.toString(), html);
-
- }else if(object.nodeType == 9){
- appendText("[ XmlDoc ]", html);
-
- }else{
- // Create link for object inspector
- // need to create an ID for this link, since it is currently text
- var id = "_a" + __consoleAnchorId__++;
- ids.push(id);
- // need to save the object, so the arrays line up
- obs.push(object);
- var str = '<a id="'+id+'" href="javascript:void(0);">'+getObjectAbbr(object)+'</a>';
-
- appendLink( str , html);
- }
- }
-
- logRow(html, className);
-
- // Now that the row is inserted in the DOM, loop through all of the links that were just created
- for(i=0; i<ids.length; i++){
- var btn = _firebugDoc.getElementById(ids[i]);
- if(!btn){ continue; }
-
- // store the object in the dom btn for reference later
- // avoid parsing these objects unless necessary
- btn.obj = obs[i];
-
- _firebugWin.console._connects.push(dojo.connect(btn, "onclick", function(){
-
- console.openObjectInspector();
-
- try{
- printObject(this.obj);
- }catch(e){
- this.obj = e;
- }
- consoleObjectInspector.innerHTML = "<pre>" + printObject( this.obj ) + "</pre>";
- }));
- }
- }
-
- function parseFormat(format){
- var parts = [];
-
- var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
- var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
-
- for(var m = reg.exec(format); m; m = reg.exec(format)){
- var type = m[8] ? m[8] : m[5];
- var appender = type in appenderMap ? appenderMap[type] : appendObject;
- var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
-
- parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
- parts.push({appender: appender, precision: precision});
-
- format = format.substr(m.index+m[0].length);
- }
-
- parts.push(format);
-
- return parts;
- }
-
- function escapeHTML(value){
- function replaceChars(ch){
- switch(ch){
- case "<":
- return "<";
- case ">":
- return ">";
- case "&":
- return "&";
- case "'":
- return "'";
- case '"':
- return """;
- }
- return "?";
- }
- return String(value).replace(/[<>&"']/g, replaceChars);
- }
-
- function objectToString(object){
- try{
- return object+"";
- }catch(e){
- return null;
- }
- }
-
- // ***************************************************************************
- function appendLink(object, html){
- // needed for object links - no HTML escaping
- html.push( objectToString(object) );
- }
-
- function appendText(object, html){
- html.push(escapeHTML(objectToString(object)));
- }
-
- function appendNull(object, html){
- html.push('<span class="objectBox-null">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendString(object, html){
- html.push('<span class="objectBox-string">"', escapeHTML(objectToString(object)),
- '"</span>');
- }
-
- function appendInteger(object, html){
- html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendFloat(object, html){
- html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendFunction(object, html){
- html.push('<span class="objectBox-function">', getObjectAbbr(object), '</span>');
- }
-
- function appendObject(object, html){
- try{
- if(object === undefined){
- appendNull("undefined", html);
- }else if(object === null){
- appendNull("null", html);
- }else if(typeof object == "string"){
- appendString(object, html);
- }else if(typeof object == "number"){
- appendInteger(object, html);
- }else if(typeof object == "function"){
- appendFunction(object, html);
- }else if(object.nodeType == 1){
- appendSelector(object, html);
- }else if(typeof object == "object"){
- appendObjectFormatted(object, html);
- }else{
- appendText(object, html);
- }
- }catch(e){
- /* squelch */
- }
- }
-
- function appendObjectFormatted(object, html){
- var text = objectToString(object);
- var reObject = /\[object (.*?)\]/;
-
- var m = reObject.exec(text);
- html.push('<span class="objectBox-object">', m ? m[1] : text, '</span>');
- }
-
- function appendSelector(object, html){
- html.push('<span class="objectBox-selector">');
-
- html.push('<span class="selectorTag">', escapeHTML(object.nodeName.toLowerCase()), '</span>');
- if(object.id){
- html.push('<span class="selectorId">#', escapeHTML(object.id), '</span>');
- }
- if(object.className){
- html.push('<span class="selectorClass">.', escapeHTML(object.className), '</span>');
- }
-
- html.push('</span>');
- }
-
- function appendNode(node, html){
- if(node.nodeType == 1){
- html.push(
- '<div class="objectBox-element">',
- '<<span class="nodeTag">', node.nodeName.toLowerCase(), '</span>');
-
- for(var i = 0; i < node.attributes.length; ++i){
- var attr = node.attributes[i];
- if(!attr.specified){ continue; }
-
- html.push(' <span class="nodeName">', attr.nodeName.toLowerCase(),
- '</span>="<span class="nodeValue">', escapeHTML(attr.nodeValue),
- '</span>"');
- }
-
- if(node.firstChild){
- html.push('></div><div class="nodeChildren">');
-
- for(var child = node.firstChild; child; child = child.nextSibling){
- appendNode(child, html);
- }
-
- html.push('</div><div class="objectBox-element"></<span class="nodeTag">',
- node.nodeName.toLowerCase(), '></span></div>');
- }else{
- html.push('/></div>');
- }
- }else if (node.nodeType == 3){
- html.push('<div class="nodeText">', escapeHTML(node.nodeValue),
- '</div>');
- }
- }
-
- // ***************************************************************************
-
- function addEvent(object, name, handler){
- if(document.all){
- object.attachEvent("on"+name, handler);
- }else{
- object.addEventListener(name, handler, false);
- }
- }
-
- function removeEvent(object, name, handler){
- if(document.all){
- object.detachEvent("on"+name, handler);
- }else{
- object.removeEventListener(name, handler, false);
- }
- }
-
- function cancelEvent(event){
- if(document.all){
- event.cancelBubble = true;
- }else{
- event.stopPropagation();
- }
- }
-
- function onError(msg, href, lineNo){
- var lastSlash = href.lastIndexOf("/");
- var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1);
-
- var html = [
- '<span class="errorMessage">', msg, '</span>',
- '<div class="objectBox-sourceLink">', fileName, ' (line ', lineNo, ')</div>'
- ];
-
- logRow(html, "error");
- }
-
-
- //After converting to div instead of iframe, now getting two keydowns right away in IE 6.
- //Make sure there is a little bit of delay.
- var onKeyDownTime = new Date().getTime();
-
- function onKeyDown(event){
- var timestamp = (new Date()).getTime();
- if(timestamp > onKeyDownTime + 200){
- event = dojo.fixEvent(event);
- var keys = dojo.keys;
- var ekc = event.keyCode;
- onKeyDownTime = timestamp;
- if(ekc == keys.F12){
- toggleConsole();
- }else if(
- (ekc == keys.NUMPAD_ENTER || ekc == 76) &&
- event.shiftKey &&
- (event.metaKey || event.ctrlKey)
- ){
- focusCommandLine();
- }else{
- return;
- }
- cancelEvent(event);
- }
- }
-
- function onCommandLineKeyDown(e){
- var dk = dojo.keys;
- if(e.keyCode == 13 && commandLine.value){
- addToHistory(commandLine.value);
- evalCommandLine();
- }else if(e.keyCode == 27){
- commandLine.value = "";
- }else if(e.keyCode == dk.UP_ARROW || e.charCode == dk.UP_ARROW){
- navigateHistory("older");
- }else if(e.keyCode == dk.DOWN_ARROW || e.charCode == dk.DOWN_ARROW){
- navigateHistory("newer");
- }else if(e.keyCode == dk.HOME || e.charCode == dk.HOME){
- historyPosition = 1;
- navigateHistory("older");
- }else if(e.keyCode == dk.END || e.charCode == dk.END){
- historyPosition = 999999;
- navigateHistory("newer");
- }
- }
-
- var historyPosition = -1;
- var historyCommandLine = null;
-
- function addToHistory(value){
- var history = cookie("firebug_history");
- history = (history) ? dojo.fromJson(history) : [];
- var pos = dojo.indexOf(history, value);
- if (pos != -1){
- history.splice(pos, 1);
- }
- history.push(value);
- cookie("firebug_history", dojo.toJson(history), 30);
- while(history.length && !cookie("firebug_history")){
- history.shift();
- cookie("firebug_history", dojo.toJson(history), 30);
- }
- historyCommandLine = null;
- historyPosition = -1;
- }
-
- function navigateHistory(direction){
- var history = cookie("firebug_history");
- history = (history) ? dojo.fromJson(history) : [];
- if(!history.length){
- return;
- }
-
- if(historyCommandLine === null){
- historyCommandLine = commandLine.value;
- }
-
- if(historyPosition == -1){
- historyPosition = history.length;
- }
-
- if(direction == "older"){
- --historyPosition;
- if(historyPosition < 0){
- historyPosition = 0;
- }
- }else if(direction == "newer"){
- ++historyPosition;
- if(historyPosition > history.length){
- historyPosition = history.length;
- }
- }
-
- if(historyPosition == history.length){
- commandLine.value = historyCommandLine;
- historyCommandLine = null;
- }else{
- commandLine.value = history[historyPosition];
- }
- }
-
- function cookie(name, value){
- var c = document.cookie;
- if(arguments.length == 1){
- var matches = c.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
- return matches ? decodeURIComponent(matches[1]) : undefined; // String or undefined
- }else{
- var d = new Date();
- d.setMonth(d.getMonth()+1);
- document.cookie = name + "=" + encodeURIComponent(value) + ((d.toUtcString) ? "; expires=" + d.toUTCString() : "");
- }
- }
-
- function isArray(it){
- return it && it instanceof Array || typeof it == "array";
- }
-
- //***************************************************************************************************
- // Print Object Helpers
- function objectLength(o){
- var cnt = 0;
- for(var nm in o){
- cnt++;
- }
- return cnt;
- }
-
- function printObject(o, i, txt, used){
- // Recursively trace object, indenting to represent depth for display in object inspector
- var ind = " \t";
- txt = txt || "";
- i = i || ind;
- used = used || [];
- var opnCls;
-
- if(o && o.nodeType == 1){
- var html = [];
- appendNode(o, html);
- return html.join("");
- }
-
- var br=",\n", cnt = 0, length = objectLength(o);
-
- if(o instanceof Date){
- return i + o.toString() + br;
- }
- looking:
- for(var nm in o){
- cnt++;
- if(cnt==length){br = "\n";}
- if(o[nm] === window || o[nm] === document){
- // do nothing
- }else if(o[nm] === null){
- txt += i+nm + " : NULL" + br;
- }else if(o[nm] && o[nm].nodeType){
- if(o[nm].nodeType == 1){
- //txt += i+nm + " : < "+o[nm].tagName+" id=\""+ o[nm].id+"\" />" + br;
- }else if(o[nm].nodeType == 3){
- txt += i+nm + " : [ TextNode "+o[nm].data + " ]" + br;
- }
-
- }else if(typeof o[nm] == "object" && (o[nm] instanceof String || o[nm] instanceof Number || o[nm] instanceof Boolean)){
- txt += i+nm + " : " + o[nm] + "," + br;
-
- }else if(o[nm] instanceof Date){
- txt += i+nm + " : " + o[nm].toString() + br;
-
- }else if(typeof(o[nm]) == "object" && o[nm]){
- for(var j = 0, seen; seen = used[j]; j++){
- if(o[nm] === seen){
- txt += i+nm + " : RECURSION" + br;
- continue looking;
- }
- }
- used.push(o[nm]);
-
- opnCls = (isArray(o[nm]))?["[","]"]:["{","}"];
- txt += i+nm +" : " + opnCls[0] + "\n";//non-standard break, (no comma)
- txt += printObject(o[nm], i+ind, "", used);
- txt += i + opnCls[1] + br;
-
- }else if(typeof o[nm] == "undefined"){
- txt += i+nm + " : undefined" + br;
- }else if(nm == "toString" && typeof o[nm] == "function"){
- var toString = o[nm]();
- if(typeof toString == "string" && toString.match(/function ?(.*?)\(/)){
- toString = escapeHTML(getObjectAbbr(o[nm]));
- }
- txt += i+nm +" : " + toString + br;
- }else{
- txt += i+nm +" : "+ escapeHTML(getObjectAbbr(o[nm])) + br;
- }
- }
- return txt;
- }
-
- function getObjectAbbr(obj){
- // Gets an abbreviation of an object for display in log
- // X items in object, including id
- // X items in an array
- // TODO: Firebug Sr. actually goes by char count
- var isError = (obj instanceof Error);
- if(obj.nodeType == 1){
- return escapeHTML('< '+obj.tagName.toLowerCase()+' id=\"'+ obj.id+ '\" />');
- }
- if(obj.nodeType == 3){
- return escapeHTML('[TextNode: "'+obj.nodeValue+'"]');
- }
- var nm = (obj && (obj.id || obj.name || obj.ObjectID || obj.widgetId));
- if(!isError && nm){ return "{"+nm+"}"; }
-
- var obCnt = 2;
- var arCnt = 4;
- var cnt = 0;
-
- if(isError){
- nm = "[ Error: "+(obj.message || obj.description || obj)+" ]";
- }else if(isArray(obj)){
- nm = "[" + obj.slice(0,arCnt).join(",");
- if(obj.length > arCnt){
- nm += " ... ("+obj.length+" items)";
- }
- nm += "]";
- }else if(typeof obj == "function"){
- nm = obj + "";
- var reg = /function\s*([^\(]*)(\([^\)]*\))[^\{]*\{/;
- var m = reg.exec(nm);
- if(m){
- if(!m[1]){
- m[1] = "function";
- }
- nm = m[1] + m[2];
- }else{
- nm = "function()";
- }
- }else if(typeof obj != "object" || typeof obj == "string"){
- nm = obj + "";
- }else{
- nm = "{";
- for(var i in obj){
- cnt++;
- if(cnt > obCnt){ break; }
- nm += i+":"+escapeHTML(obj[i])+" ";
- }
- nm+="}";
- }
-
- return nm;
- }
-
- //*************************************************************************************
-
- //window.onerror = onError;
-
- addEvent(document, has("ie") || has("safari") ? "keydown" : "keypress", onKeyDown);
-
- if( (document.documentElement.getAttribute("debug") == "true")||
- (dojo.config.isDebug)
- ){
- toggleConsole(true);
- }
-
- dojo.addOnWindowUnload(function(){
- // Erase the globals and event handlers I created, to prevent spurious leak warnings
- removeEvent(document, has("ie") || has("safari") ? "keydown" : "keypress", onKeyDown);
- window.onFirebugResize = null;
- window.console = null;
- });
+ // There used to be code here for adding a "firebug lite" console, but it's no longer needed on any
+ // of the browsers we support, because they all have built-in consoles.
});
diff --git a/_firebug/infoIcon.png b/_firebug/infoIcon.png
deleted file mode 100644
index da1e533..0000000
Binary files a/_firebug/infoIcon.png and /dev/null differ
diff --git a/_firebug/tab_lft_norm.png b/_firebug/tab_lft_norm.png
deleted file mode 100644
index f0479a2..0000000
Binary files a/_firebug/tab_lft_norm.png and /dev/null differ
diff --git a/_firebug/tab_lft_over.png b/_firebug/tab_lft_over.png
deleted file mode 100644
index 2f36cca..0000000
Binary files a/_firebug/tab_lft_over.png and /dev/null differ
diff --git a/_firebug/tab_rgt_norm.png b/_firebug/tab_rgt_norm.png
deleted file mode 100644
index 464af3e..0000000
Binary files a/_firebug/tab_rgt_norm.png and /dev/null differ
diff --git a/_firebug/tab_rgt_over.png b/_firebug/tab_rgt_over.png
deleted file mode 100644
index 2bc2cd0..0000000
Binary files a/_firebug/tab_rgt_over.png and /dev/null differ
diff --git a/_firebug/warningIcon.png b/_firebug/warningIcon.png
deleted file mode 100644
index de51084..0000000
Binary files a/_firebug/warningIcon.png and /dev/null differ
diff --git a/main.js b/main.js
index be155dd..f8a60d1 100644
--- a/main.js
+++ b/main.js
@@ -21,11 +21,7 @@ define([
// summary:
// This is the package main module for the dojo package; it loads dojo base appropriate for the execution environment.
- // the preferred way to load the dojo firebug console is by setting has("dojo-firebug") true in dojoConfig
- // the isDebug config switch is for backcompat and will work fine in sync loading mode; it works in
- // async mode too, but there's no guarantee when the module is loaded; therefore, if you need a firebug
- // console guaranteed at a particular spot in an app, either set config.has["dojo-firebug"] true before
- // loading dojo.js or explicitly include dojo/_firebug/firebug in a dependency list.
+ // Load code to fix IE's console
if(config.isDebug){
require(["./_firebug/firebug"]);
}
diff --git a/robotx.js b/robotx.js
index c376a88..574059a 100644
--- a/robotx.js
+++ b/robotx.js
@@ -24,10 +24,6 @@ kernel.experimental("dojo.robotx");
// The iframe containing the external app
var iframe = null;
-// On IE6/7, a firebug console will appear. Scrunch it a bit to leave room for the external test file.
-kernel.config.debugHeight = kernel.config.debugHeight || 200;
-
-
// urlLoaded is a Deferred that will be resolved whenever the iframe passed to initRobot() finishes loading, or reloads
var urlLoaded;
@@ -49,19 +45,18 @@ function attachIframe(url){
style.set(document.documentElement, emptyStyle);
style.set(document.body, emptyStyle);
- // Create the iframe for the external document. Put it above the firebug-lite div (if such a div exists).
+ // Create the iframe for the external document.
// console.log("creating iframe for external document");
iframe = document.createElement("iframe");
iframe.setAttribute("ALLOWTRANSPARENCY","true");
iframe.scrolling = has("ie") ? "yes" : "auto";
var scrollRoot = document.compatMode == "BackCompat" ? document.body : document.documentElement;
- var consoleHeight = (document.getElementById("firebug") || {}).offsetHeight || 0;
style.set(iframe, {
border: "0px none",
padding: "0px",
margin: "0px",
width: "100%",
- height: consoleHeight ? (scrollRoot.clientHeight - consoleHeight)+"px" : "100%"
+ height: "100%"
});
iframe.src = url;
diff --git a/testsDOH/_base/html_element.html b/testsDOH/_base/html_element.html
index 0282d8a..693cbb7 100644
--- a/testsDOH/_base/html_element.html
+++ b/testsDOH/_base/html_element.html
@@ -117,17 +117,11 @@
},
function destroyAll(t){
- var c = function(){
- // eg: don't destroy firebug lite in page
- return dojo.query("body >").filter(function(n){
- return !dojo.hasClass(n, "firebug");
- })
- };
- c().forEach(dojo.destroy);
+ dojo.query("body >").forEach(dojo.destroy);
- // check for deepest embeeded id
+ // check for deepest embedded id
doh.f(dojo.byId("ancFoo"));
- doh.is(0, c().length);
+ doh.is(0, dojo.query("body >").length);
},
function recreateOneV1(t){
diff --git a/testsDOH/test_FirebugLite.html b/testsDOH/test_FirebugLite.html
deleted file mode 100644
index 4a85202..0000000
--- a/testsDOH/test_FirebugLite.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>Firebug Lite Tests</title>
- <script type="text/javascript">
- // enable Lite in Firefox:
- console = null;
- var djConfig = {
- isDebug: true,
- debugHeight: 100,
- popup:false
- };
- </script>
-
- <script type="text/javascript" src="../dojo.js"></script>
- <script type="text/javascript">
- obj = { // a long object to test scrolling in object inspector
- mobby:{d:"objectify", e:"erroroneous", f:"functastic", obby:{lilOb:"moOb"}},
- a:"Dojo",
- b:2,
- c:[0,8],
- id:"MyCoolObject",
- extra:{d:"objectify2", e:"erroroneous2", f:"functastic2", obby:{lilOb:"moOb2"}},
- aaa:"Dojo",
- bbb:22,
- ccc:[10,18],
- idDeedYee:"MyCoolObjectie"
- };
-
- obj2 = {
- a:"Dojo",
- b:2,
- c:[0,8],
- id:"MyCoolObject"
- };
-
- obj3 = {
- a:"Dojo",
- b:2,
- c:[0,8]
- };
-
- outputText = function(){
- for(var i = 0; i < 20; i++){
- console.log(i + ":: foo");
- }
- };
- doStuff = function(){
- console.log("FOO! More FOO! Gotta have some FOO MAN!")
- };
-
- doStuffLots = function(){
- for(var i = 0; i < 5; i++){
- console.log("xxxxxxxx")
- doStuff();
- }
- };
- dojo.addOnLoad(function(){
- console.time("foo time")
- // test objects
- console.log(obj3, "::", [1,2,3,4,5,6,7,8,9,0]);
- console.log("Dojo was here", obj, "object over", obj2);
-
- // test that tracing dom node does not break (due to lack of support)
- console.log(dojo.byId("foo"))
-
- // test error functionality
- console.error(new Error("There was a dummy error"));
-
- //throws exception:
- //console.assert(true == false)
-
- console.group("myGroup");
- console.log("group me 1");
- console.log("group me 2");
- console.log("group me 3");
- console.groupEnd();
-
- // testing log styling
- console.log("foo");
- console.debug("foo");
- console.info("foo");
- console.warn("foo");
- console.error("foo");
- //timer end
- console.timeEnd("foo time")
- });
-
- function doCon(){
- }
- </script>
-</head>
-<body>
- <div id="foo" font="Arial" style="display:none;">Dojo was here</div>
- <button onclick="doStuff()">Do Foo Stuff</button>
- <button onclick="doStuffLots()">Do Stuff Lots</button>
- <div id="trc"></div>
- </body>
-</html>
diff --git a/testsDOH/test_FirebugLitePopup.html b/testsDOH/test_FirebugLitePopup.html
deleted file mode 100644
index 04db5a7..0000000
--- a/testsDOH/test_FirebugLitePopup.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>Firebug Lite Tests</title>
- <script type="text/javascript">
- // enable Lite in Firefox:
- console = null;
- var djConfig = {
- isDebug: true,
- debugHeight: 100,
- popup:true // who knew?
- };
- </script>
-
- <script type="text/javascript" src="../dojo.js"></script>
- <script type="text/javascript">
- obj = { // a long object to test scrolling in object inspector
- mobby:{d:"objectify", e:"erroroneous", f:"functastic", obby:{lilOb:"moOb"}},
- a:"Dojo",
- b:2,
- c:[0,8],
- id:"MyCoolObject",
- extra:{d:"objectify2", e:"erroroneous2", f:"functastic2", obby:{lilOb:"moOb2"}},
- aaa:"Dojo",
- bbb:22,
- ccc:[10,18],
- idDeedYee:"MyCoolObjectie"
- };
-
- obj2 = {
- a:"Dojo",
- b:2,
- c:[0,8],
- id:"MyCoolObject"
- };
-
- obj3 = {
- a:"Dojo",
- b:2,
- c:[0,8]
- };
-
- outputText = function(){
- for(var i = 0; i < 20; i++){
- console.log(i + ":: foo");
- }
- };
- doStuff = function(){
- console.log("FOO! More FOO! Gotta have some FOO MAN!")
- };
-
- doStuffLots = function(){
- for(var i = 0; i < 5; i++){
- console.log("xxxxxxxx")
- doStuff();
- }
- };
- dojo.addOnLoad(function(){
- console.time("foo time")
- // test objects
- console.log(obj3, "::", [1,2,3,4,5,6,7,8,9,0]);
- console.log("Dojo was here", obj, "object over", obj2);
-
- // test that tracing dom node does not break (due to lack of support)
- console.log(dojo.byId("foo"))
-
- // test error functionality
- console.error(new Error("There was a dummy error"));
-
- //throws exception:
- //console.assert(true == false)
-
- console.group("myGroup");
- console.log("group me 1");
- console.log("group me 2");
- console.log("group me 3");
- console.groupEnd();
-
- // testing log styling
- console.log("foo");
- console.debug("foo");
- console.info("foo");
- console.warn("foo");
- console.error("foo");
- //timer end
- console.timeEnd("foo time")
- });
-
- function doCon(){
- }
- </script>
-</head>
-<body>
- <h1>test Firebug popup window</h1>
- <div id="foo" font="Arial" style="display:none;">Dojo was here</div>
- <button onclick="doStuff()">Do Foo Stuff</button>
- <button onclick="doStuffLots()">Do Stuff Lots</button>
- <div id="trc"></div>
- </body>
-</html>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list