The first release candidate for Prototype 1.5.1 is now available for download. Prototype 1.5.1_rc1 contains bug fixes, performance improvements, and a few new features. If you’re using Prototype 1.5.0 in your application, we urge you to upgrade to this release candidate and report any bugs you may encounter. Assuming no heinous bugs are found, you can expect the final version to be released sometime within the next couple of weeks.

Keep reading for an overview of what’s changed (or see the full CHANGELOG for more details).

Bug fixes

  • $$ no longer returns duplicates for certain selectors. [#7568]
  • Hash#toQueryString no longer doubly encodes certain parameters. [#7421]
  • $H no longer iterates over shadowed properties in Safari. [#7421]
  • Form.Element#disable will now call blur(), removed blur() call from Form.Element#enable. [#6034]
  • Fixed an issue with serializing empty array inputs. [#7516]
  • Fixed a bug in the simulated hasAttribute for IE due to getAttributeNode sometimes returning null.
  • Fixed that Form.Methods and Form.Element.Methods weren’t being applied correctly to forms and form elements in Safari. [#7358]
  • Fixed setStyle with opacity: 0 to work correctly in IE.
  • Fixed that Form.Element#activate shouldn’t raise an exception when the form or field is hidden.

New features and changes

Performance improvements

  • $$ is now blazing fast. Seriously — try it out. If you’re using $$ at all, you owe it to yourself to upgrade! Element#down, Element#up, Element#previous and Element#next received performance boosts too (along with everything else that uses Selector).
  • Element#getStyle and Element#setStyle are now faster.
  • Array#uniq is faster. [#7417]
  • String#escapeHTML now uses a cached div and text node, making it much faster. [#6937]
  • Enumerable iteration is faster now that it incurs only one try/catch block instead of two (as a result of removing support for $continue).

The $$/Selector improvements come from Andrew and Christophe’s many hours of work, and were inspired by Jack Slocum’s DomQuery and Joe Hewitt’s CSS selector-to-XPath translation. Selector is now backed by XPath where available (Firefox and Opera 9), and is optimized to be 5x faster on average than the previous version in browsers without XPath.

Thanks to everyone who contributed to this release!

Download Prototype 1.5.1_rc1