Changeset 7652

Show
Ignore:
Timestamp:
03/18/07 22:14:54 (22 months ago)
Author:
alex
Message:

provide console.* stubs for environments that don't have Firebug. Refs #2500

Location:
dojo/trunk/_base/_loader
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/_base/_loader/bootstrap.js

    r7650 r7652  
    2424        if(typeof this["djConfig"] == "undefined"){ 
    2525                this.djConfig = {}; 
     26        } 
     27 
     28        // firebug stubs 
     29        if(!this["console"]){ 
     30                this.console = {}; 
     31        } 
     32        var cn = [ 
     33                "assert", "count", "debug", "dir", "dirxml", "error", "group", 
     34                "groupEnd", "info", "log", "profile", "profileEnd", "time", 
     35                "timeEnd", "trace", "warn" 
     36        ]; 
     37        var i=0, tn; 
     38        while(tn=cn[i++]){ 
     39                if(!console[tn]){ 
     40                        console[tn] = function(){}; 
     41                } 
    2642        } 
    2743 
  • dojo/trunk/_base/_loader/hostenv_browser.js

    r7650 r7652  
    22        dojo.isBrowser = true; 
    33        dojo._name = "browser"; 
     4 
    45 
    56        // attempt to figure out the path to dojo if it isn't set in the config 
     
    5253        })(); 
    5354 
     55        dojo._println = console.debug; 
    5456 
    5557        // These are in order of decreasing likelihood; this will change in time. 
     
    163165                return http.responseText; // String 
    164166        } 
    165  
    166         dojo._println = console.debug; 
    167167 
    168168        dojo._handleNodeEvent = function(/*DomNode*/node, /*String*/evtName, /*Function*/fp){