Prototype 1.5.1 released
After almost two months of testing through four release candidates, the final version of 1.5.1 is here. The core team and dozens of contributors have fixed 30 bugs and introduced a slew of features and performance optimizations since 1.5.0. Here’s a look at the highlights of our best release yet.
- Incredible Selector speedup and full CSS3 support (read about it in the original post).
- Full JSON encoding and decoding support and options for improved security.
- Optimized
Element#get/setStylefor cross-browser compatibility and speed. - Various
Stringmethod enhancements and fixes. - The new
Form#requestmethod simplifies the common case of submitting a serialized form with XMLHttpRequest. - Many form serialization fixes—if you had troubles before, now they’ve been squashed.
This list isn’t nearly complete, so hop to the CHANGELOG for the full thing.
We’ve also been updating the API documentation. You will notice that the new methods since 1.5.0 are marked with a version tag by their name. Also, the old methods that have gained new features are now updated to reflect those changes. If you find any errors in the documentation, please report them on the issue tracker or the Core mailing list.
Those who will continue to use version 1.5.0 can still use the docs without confusion, but—unless you have a compelling reason to do so—we urge you to upgrade to the new version. It’s just so much better! ;)
Thanks to all the core members and contributors who made this release possible.
Sorry, comments are closed for this article.


Comments
Thanks for your hard work. We appreciate it!
Congratulations on the new release. Will be switching to it immediately!
Well done! I especially like the form#request fixes, thumbs up :)
keep up the good work
Ottimo lavoro. Grazie.
Great Job !!!!
I love to hear that 1.5.1 has great selector performance :)
Thanks a lot guys for your work!
Thanks for this wonderful API!
you dind’t fix replace() method!!! i submited a ticket 3 weeks ago… if you wish to replace an <input> element just replace line 1363:
with
Excelente!!!!
Is there a chance to have a working compressed version ?
You can download compressed and gzipped versions of 1.51 at: http://groups.google.com/group/prototype-core/files
ProtoPacked v2.12. Prototype 1.5.1 is 15.8kb gzipped.
There are also formatted versions of all major Prototype releases that should work with many of the JS Compressors out there.
Thanks and congratulations! :) Is there any known issue when upgrading or is it fully backward compatible with 1.5.0 ?
I will move to 1.5.1 when there is a new Scriptaculous stable version. By the way, is there a reason why Prototype and Scriptaculous releases are not synchronized ? So many people use both…
Thanks again !
Javascript made easy :D many thanks
Things to be aware of for backwards compat:
The use of $continue is no longer recommended and you will get an error msg telling you to use “return” instead.
You no longer need json.js because Prototype has all the JSON methods you need. http://www.prototypejs.org/learn/json (supports JSON security measures too!)
Also, Element.toggle( el1, el2, el3) no longer works.
From their site: In previous versions of Prototype, you could pass an arbitrary number of elements to Element.toggle, Element.show, and Element.hide, for consistency, this is no longer possible in version 1.5!
You can use: $(’content’, ‘navigation’, ‘footer’).invoke(’hide’);
I was wondering if there are any resources available on how to upgrade successfully from older versions (1.4.0, in particular)? I’ve seen the comments about the new behavior for Element.show, etc, but haven’t seen anything else general in the release announcements and some brief googling.
Otherwise this looks like an awesome new release, so I’m looking to help some projects update.
Thanks allot for making it. For me, Prototype makes Javascript finally useable.
toJSON() is greatly appreciated! Works very well with ZF. Thanks!
There is an error when I used an Ajax request on firefox. I check up for it and find that “Ajax.setRequestHeaders” lack a sentence “if (typeof headers[name] != ‘function’)” in line 1039
asd: A shame we missed that… your ticket did not start with
[PATCH]... hence it did not show up in the relevant trac report. This will be corrected in 1.5.2.chenjin: There has been lots of talk about this issue already. This is not an issue with Prototype, it’s an issue with misbehaving third party libraries which extend
Object.prototype. My guess is you are using json.js. If so, simply switch to Prototype’s new JSON encoder / decoder and you’ll be all set.I get a “too much recursion” error on line 1288 when trying to use the 1.51 libs to implement an auto_complete text box in rails/firefox. I spent two days trying to troubleshoot it before using 1.5, which fixed my problem. My JS skills aren’t good enough to fix the error directly, but if any other people out there have the same problem I hope I might save them the pain.
Now that it’s working, it looks great. Props for your hard work.
-g
Gary: updating script.aculo.us to version 1.7.1 beta 2 will solve your recursion issue.
你好,看到你的作品,真的很棒,也很想交你这个朋友,我来自中国,再次支持的你努力,谢谢
同意楼上的观点。
Prototype确实好用,希望你能再接再厉!
We have been waiting for the final release for a while. thank you guys.
Prototype rocks!
@Gary: I’m pretty sure the problem has to do with setOpacity. If I comment out “element.setOpacity(styles[property])” on line
(So sorry… submitted last comment too early)
@Gary: I’m pretty sure the problem has to do with setOpacity. If I comment out “element.setOpacity(styles[property])” on line 1588, and substitute the substance of that method “element.style.opacity = (styles[property] 1 || styles[property] = ’’) ? ’’ : (styles[property] < 0.00001) ? 0 : styles[property];” everything works fine. I’m not sure of the deeper reason why calling it out as a separate method causes recursion. Anyone out there have any insight?
Btw, I’ve just started using Prototype recently after a year on my own js framework, and it’s a dream. Thanks for all the great work!
Scott: Please read my comment above. The reason for that recursion issue is that the opacity setter and getter have been moved from script.aculo.us to Prototype, as of Prototype version 1.5.1. If you are using Prototype with a legacy version of script.aculo.us, you are going to get recursion issues.
The simple solution is to update to script.aculo.us 1.7.1 beta 2.
Of course, your hack may work now, but it also might ruin part of the framework, make later updating harder, or wreck additional libraries you might wish to use with Prototype. I don’t recommend it.
Prototype is awesome, makes my life so much easier. I have more reasons to love Javascript now. Your work is much appreciated.
您好,非常喜欢Prototype,衷心的感谢!
You also can use: $(’content’, ‘navigation’, ‘footer’).invoke(’hide’);
Thanks for your hard work. I’m chinaese,prototype.js I like it!
Thanks a lot, prototype rocks! :)
I’m getting the same recursion error: “too much recursion” line 1288
I’m using script.aculo.us 1.7.1 beta 2
It’s happening when I try the Puff or Fade Effects. I can use Shake effect on the same element and no problems.
Any ideas?
Disregard the last comment, I updated the wrong prototype directory. It is now working great. Thanks for your hard work!
谢谢,谢谢!!!真心的感谢!来自中国的爱好者!
Thanks
Cool, I like the new features, but prototype is becoming kind of heavy to download, almost 100k ! Would be interesting to have a compress option, like moo tools.
prototype is the best!!!
А даже купил себе майку с надписью Prototype
Hey I got The Same PRoblem Here “too much recursion [Break on this error] this.each(function(value, index) { on line 348” and “too much recursion
on line 541” Can You Give me some Help? I’m using Validation.js from dexago group
Napakagaling!
Kudos to all, thanks guy