Changeset 8930
- Timestamp:
- 02/26/08 12:53:41 (6 months ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/ext/deprecation/deprecation_test.html (modified) (2 diffs)
- spinoffs/prototype/trunk/ext/deprecation/deprecation.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/trunk/CHANGELOG
r8859 r8930 1 * deprecation extension: mark Class.create() used without arguments as deprecated. [Tobie Langel] 2 3 * deprecation extension: mark Event.unloadCache as removed rather than deprecated. [Tobie Langel] 4 5 * deprecation extension: log everything *but* deprecations with console.error. [Tobie Langel] 6 1 7 * Change deprecation extension to use Firebug's console.warn and console.error. [Andrew Dupont, Tobie Langel] 2 8 spinoffs/prototype/trunk/ext/deprecation/deprecation_test.html
r8859 r8930 213 213 testEvent: function(){ with(this) { 214 214 Event.unloadCache(); 215 assert DeprecationNotified('Event.unloadCache has been deprecated.')215 assertRemovalNotified('Event.unloadCache has been deprecated.') 216 216 }}, 217 217 … … 255 255 assertRespondsTo('toJSON', h) 256 256 }}, 257 258 testClass: function(){ with(this) { 259 Class.create(); 260 assertDeprecationNotified('The class API has been fully revised and now allows for mixins and inheritance.\n' + 261 'You can find more about it here: http://prototypejs.org/learn/class-inheritance'); 262 Class.create({}); 263 assertNotNotified(); 264 }}, 257 265 258 266 testLogDeprecationOption: function(){ with(this) { spinoffs/prototype/trunk/ext/deprecation/deprecation.js
r8859 r8930 62 62 63 63 log: function(message, type) { 64 if (type === 'removal') {64 if (type !== 'deprecation') { 65 65 console.error(message); 66 66 } else console.warn(message); … … 296 296 methodName: 'unloadCache', 297 297 namespace: Event, 298 message: 'Event.unloadCache has been deprecated.' 298 message: 'Event.unloadCache has been deprecated.', 299 type: 'removal' 300 }, 301 302 { 303 methodName: 'create', 304 namespace: Class, 305 message: 'The class API has been fully revised and now allows for mixins and inheritance.\n' + 306 'You can find more about it here: http://prototypejs.org/learn/class-inheritance', 307 condition: function() { 308 return !arguments.length; 309 } 299 310 } 300 311 ]);