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:

  1.  
  2. var Foo = Class.create();
  3. Class.extend(Foo, { /* instance methods */ });
  4.  

to:

JAVASCRIPT:

  1.  
  2. var Foo = Class.create();
  3. Foo.addMethods({ /* instance methods */ });
  4.  

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

Leave a Reply

You must be logged in to post a comment.



Site Navigation