Wednesday, February 13th, 2008
Prototype Deprecation.js: 1.5 to 1.6 made easier
<>p>
Tobie Langel has developed a deprecation script to help you move from Prototype 1.5 to 1.6:
When your code calls a method that’s been deprecated, replaced, or modified, the script will log a warning or error to your Firebug console. Clicking its hyperlink will take you to the deprecation script itself, which isn’t all that helpful; but the message itself will contain a stack trace that points to the source of the error.
Naturally, the console errors are the most important to address, since they represent things that will no longer work in 1.6. The warnings represent deprecations — things that still work in 1.6, but are not guarateed to work in future versions of Prototype. If you’d like to see only removal notices, you can set a property in your code to turn off deprecations:
DeprecationNotifier.logDeprecation = false;As you address these errors and warnings, they’ll go away. When there are no more errors, your code is compatible with 1.6. When there are no more warnings, your code is nimble and future-proof.
Related Content:











This is a great idea. Anyone got a deprecation script to go from Prototype 1.3.1 to 1.6? I’ve inherited a bunch of code that sorely needs updating.
1.3.1 holy cow thats like over 3 years old.. i had to do some mad google’n to find that stuff….
Ben, you can probably use the very same script. You might be missing a couple of things, but it should still help quite a bit.