Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8859

Show
Ignore:
Timestamp:
02/12/08 19:04:26 (3 months ago)
Author:
andrew
Message:

Change deprecation extension to use Firebug's console.warn and console.error. [Andrew Dupont, Tobie Langel]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/trunk/CHANGELOG

    r8804 r8859  
     1* Change deprecation extension to use Firebug's console.warn and console.error. [Andrew Dupont, Tobie Langel] 
     2 
    13* Make tagName comparisons XHTML-compliant. Closes #11012, #11013, #11014. [cfis, Tobie Langel] 
    24 
  • spinoffs/prototype/trunk/ext/deprecation/deprecation_test.html

    r8769 r8859  
    3636  }); 
    3737   
    38   DeprecationNotifier.log = function(message) { 
    39     console.log(message.replace(/@[^\n]+/, '')) 
    40   } 
    41    
    4238  Array.prototype.beforeLast = function() { 
    4339    return this[this.length - 2]; 
  • spinoffs/prototype/trunk/ext/deprecation/deprecation.js

    r8769 r8859  
    66 *  For details, see the Prototype web site: http://www.prototypejs.org/ 
    77 *   
    8  *  Include this file right below prototype.js. All warning message 
     8 *  Include this file right below prototype.js. All warning messages 
    99 *  will be logged to the console. 
    1010 *   
     
    4747      stack: this.getStack(), 
    4848      type: type.capitalize() 
    49     })); 
     49    }), type); 
    5050    return true; 
    5151  }, 
     
    5656    } catch(e) { 
    5757      return e.stack.match(this.Regexp).reject(function(path) { 
    58         return /(prototype|unittest|deprecation)\.js/.test(path) 
     58        return /(prototype|unittest|deprecation)\.js/.test(path); 
    5959      }).join("\n"); 
    6060    } 
    6161  }, 
    6262   
    63   log: function(message) { 
    64     console.log(message) 
     63  log: function(message, type) { 
     64    if (type === 'removal') { 
     65      console.error(message); 
     66    } else console.warn(message); 
    6567  } 
    6668};