Changeset 8859
- Timestamp:
- 02/12/08 19:04:26 (3 months ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/ext/deprecation/deprecation_test.html (modified) (1 diff)
- spinoffs/prototype/trunk/ext/deprecation/deprecation.js (modified) (3 diffs)
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 1 3 * Make tagName comparisons XHTML-compliant. Closes #11012, #11013, #11014. [cfis, Tobie Langel] 2 4 spinoffs/prototype/trunk/ext/deprecation/deprecation_test.html
r8769 r8859 36 36 }); 37 37 38 DeprecationNotifier.log = function(message) {39 console.log(message.replace(/@[^\n]+/, ''))40 }41 42 38 Array.prototype.beforeLast = function() { 43 39 return this[this.length - 2]; spinoffs/prototype/trunk/ext/deprecation/deprecation.js
r8769 r8859 6 6 * For details, see the Prototype web site: http://www.prototypejs.org/ 7 7 * 8 * Include this file right below prototype.js. All warning message 8 * Include this file right below prototype.js. All warning messages 9 9 * will be logged to the console. 10 10 * … … 47 47 stack: this.getStack(), 48 48 type: type.capitalize() 49 }) );49 }), type); 50 50 return true; 51 51 }, … … 56 56 } catch(e) { 57 57 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); 59 59 }).join("\n"); 60 60 } 61 61 }, 62 62 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); 65 67 } 66 68 };