*SVN* * Optimize document.getElementsByClassName and finalize DOM performance optimization refactoring. Closes #6696. [Mislav Marohnić] * Fix an issue with serializing empty array inputs. Closes #7516. [stakadush, Mislav Marohnić] * Add optional third parameter "camelized" to Element.setStyle, for optimized performance if style names are known to be camelCased. [Thomas Fuchs] * Fix a bug in the simulated hasAttribute for IE due to getAttributeNode sometimes returning null. [sam] * Optimize Element.getStyle and add new Element.getOpacity method. Special case IE and Opera getStyle methods. Closes #7648. [Tobie Langel, Thomas Fuchs] * Optimize Element.setStyle and add new Element.setOpacity method, special case IE and Gecko opacity methods. Closes #7585. [savetheclocktower] * Add unified Browser detection by providing Prototype.Browser.(IE|Gecko|WebKit|Opera) booleans. Closes #6800. [savetheclocktower] * Add String.prototype.empty and String.prototype.blank (tests if empty or whitespace-only). Closes #7016. [Jonathan Viney, Thomas Fuchs] * Update README to reflect new URLs, update LICENSE copyright years. Closes #7426. [Tobie Langel] * Array.prototype.uniq optimization. Closes #7417. [Christophe Porteneuve] * String.prototype.endsWith should not fail on multiple occurrences. Closes #7416. [Christophe Porteneuve] * Add Form.Methods.request as a convenience method for serializing and submitting a form via Ajax.Request to the URL in the form's action attribute. [sam] Options passed to request() are intelligently merged with the underlying Ajax.Request options: - If the form has a method attribute, its value is used for the Ajax.Request method option. If a method option is passed to request(), it takes precedence over the form's method attribute. If neither is specified, method defaults to "post". - Key/value pairs specified in the parameters option (either as a query string or as a hash) will be merged with (and take precedence over) the serialized form parameters. * Fix $(form).serialize() in Safari and add support for extending specific tags to Element.addMethods. Closes #7358. [Andrew Dupont] * Add String.prototype.startsWith, String.prototype.endsWith, and String.prototype.include. Closes #7075. [Tobie Langel] * Improve performance of String.prototype.escapeHTML by using a cached div and text node. Closes #6937. [altblue] * Make setStyle() with opacity: 0 in Internet Explorer work correctly. [Thomas Fuchs] * Form.Element.activate shouldn't raise an exception when the form or field is hidden. [sam] * Remove support for "throw $continue" in Enumerable. Use "return" instead. [sam] * Update HEADER to reflect new URL. [sam] *1.5.0* (January 18, 2007) * Add test to ensure Content-type header is set for simulated verbs. [sam] * Fix Content-Type header for HTTP methods simulated with POST not defaulting to application/x-www-form-urlencoded. [Thomas Fuchs] * Simplify form serialization and add support for fields with the same name as Hash methods. Closes #6649. [Mislav Marohnić] * Fix attribute selectors for IE. Closes #5170. [Tobie Langel, Andrew Dupont] * A slew of dom.js improvements. Closes #4217, #6589, #7001. [Tobie] - Fix Element.getDimensions() for hidden elements, make Element.getHeight() use .getDimensions() - Add Element.getWidth() - Make Element.replace() call .toString() on the html argument (alike .update()) - Fix an issue with Element.get/setStyle() and Safari with 'float' - Add a bunch of missing unit tests * Fix an issue with Element.setStyle({opacity:''}) setting the opacity to 0 instead of removing the set inline opacity style. [Thomas Fuchs] * Ensure Ajax.Request's evalResponse is called before onComplete so that onComplete can reference any elements created during the response. Closes #6727. [jonathan] * Ensure the WEBrick test runner sets the correct Content-Type for tests and fixtures. [sam] * Form.serialize once again works with non-form elements. This is a temporary change to prevent the Rails link_to_remote regression described in #6898. Prototype 1.5.1 will introduce an API for working with collections of arbitrary form elements. References #6887. Closes #6898. [sam] * Make selectors match forms that have an element with name="id" correctly, fixes #5759 [mislav] * Remove support for HTTP authorization in Ajax calls introduced with #6366. Closes #6638 [jmecham] * Add Enumerable.size() to count elements in an enumerable and the corresponding Array.size() method, fixes #6710 [ZenCocoon] * Add String.succ() method to allow for String ranges, fixes #6037 [Cory Hudson, mislav] Examples: 'abcd'.succ(); -> 'abce' $R('a','d').map(function(char){ return char; }); -> ['a','b','c','d'] * Make Element.scrollTo() correctly consider offsets of parent DOM nodes, fixes #6625 [ohader, savetheclocktower] * Fix Enumerable.inGroupsOf() to correctly work with fill values that evaluate to false, fixes #6782 [hawk] * Remove/cleanup redundant $() calls in dom.js, fixes #6817 [Tobie] * Don't cache files in automatic unit tests, fixes #6218 [voidlock] * Add $w() to easily create arrays from strings like Ruby's %w, fixes #5682 [glazedginger, brendon.aaron] * Add Element.toggleClassName() to toggle CSS classes on elements, fixes #6759 [Tobie] * Make Form.getInputs always return an array for consistency, fixes #6475 [Justin Gehtland, savetheclocktower] * Make TimedObserver work correctly for SELECT MULTIPLE elements, fixes #6593 [clemos, tdd] * Fix Template.prototype.evaluate to correctly interpret 0 and false values, add String.interpret() for safely interpreting and converting values to strings, fixes #6675 [hawk] * Make Element.getStyle() work with camelCased argument, fixes #6686 [Tobie] * Fix a redundant check in Array.prototype.compact, fixes #4739 [wlodarcz, mislav] * Fix $() to correctly pass back the results of document.getElementById(), notably returning "null" on elements not found, fixes #6582 [adsmart] * Change/add assertNull, assertUndefined, assertNullOrUndefined and not-* variants in unittest.js, fixes #6582 [adsmart] * Cleanup String.prototype.camelize, fix an issue with String.prototype.underscore, fixes #4714, #6685 [Tobie, Thomas Fuchs] * Add String.prototype.capitalize, which returns a string with the first character in upper case, fixes #6666 [Tobie] * Make Element.getStyle() and Element.setStyle() handle the CSS 'opacity' property transparently in IE, fixes #6093 [brandon.aaron, Tobie] * Fix handling of CSS 'float' property for Element.getStyle() and Element.setStyle(), fixes #4160 [Thomas Fuchs, ericf] * Fix that onComplete would be called twice with synchronous Ajax requests on Safari (provides units tests for #5756) [Thomas Fuchs] * Fix Form.Field.activate to not select text on buttons in IE, fixes #2653 [sutch, mislav, Thomas Fuchs] * Fix String.unescapeHTML() on Firefox for strings that are longer than 2048 bytes, fixes #5789 [Paul Moers, Thomas Fuchs] * Redefine Array.prototype.concat for Opera, as the native implemenation doesn't work correctly [Thomas Fuchs] * Add unit tests for Function.prototype.bind() [Thomas Fuchs] * Add String.prototype.underscore and String.prototype.dasherize [Thomas Fuchs] Examples: 'Hello_World'.dasherize() -> 'Hello-World' 'borderBottomWidth'.underscore() -> 'border_bottom_width' 'borderBottomWidth'.underscore().dasherize() -> 'border-bottom-width' *1.5.0_rc2* (November 11, 2006) * Ensure that existing DOM properties take precedence over extended element methods in all browsers. Closes #5115. [Sean Kleinjung, sam] * Add Element.Methods.readAttribute as a simple wrapper around getAttribute (which isn't a "real" function and doesn't have .apply or .call in Safari and IE). Useful in conjunction with Enumerable.invoke for extracting the values of a custom attribute from a collection of elements. [sam] Example: