Wednesday, February 13th, 2008
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.
Posted by Dion Almaer at 8:47 am