Prototype 1.6.0 RC1: Changes to the Class and Event APIs, Hash rewrite, and bug fixes
Written by on October 16th, 2007 in Ajax News.
Sam Stephenson has announced Prototype 1.6.0 RC1 which has “fixed a handful of bugs and made some changes to the Class and Event APIs in response to your feedback. We’ve also addressed a long-standing issue with the Hash class.”
For example, they show how they changed from:
JAVASCRIPT:
-
-
var Foo = Class.create();
-
Class.extend(Foo, { /* instance methods */ });
-
to:
JAVASCRIPT:
-
-
var Foo = Class.create();
-
Foo.addMethods({ /* instance methods */ });
-
Other changes are:
- Completely rewriten of the Hash class
- Changes to the Event API
- Element#wrap now returns the newly created wrapper element instead of the element being wrapped.
- document.getElementsByClassName and Element#getElementsByClassName are now deprecated, since native implementations of these methods return a live NodeList, while we can only return a static Array. Please use $$ or Element#select instead.
Source: Ajaxian
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/170860468/prototype-160-rc1-changes-to-the-class-and-event-apis-hash-rewrite-and-bug-fixes