Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/spinoffs/prototype/branches/1-6-0-events/CHANGELOG

Revision 7269, 37.9 kB (checked in by sam, 1 year ago)

prototype: Make the eventName and handler arguments to Event.stopObserving optional. If no handler is specified, all handlers for the given event are unregistered. If no event name is specified, all observed events on the element are unregistered.

Line 
1 *SVN*
2
3 * Make the eventName and handler arguments to Event.stopObserving optional.  If no handler is specified, all handlers for the given event are unregistered.  If no event name is specified, all observed events on the element are unregistered.  [sam]
4
5 * Add cross-support for the DOMContentLoaded event through a Prototype custom event on document called "contentloaded".  The DOMContentLoaded event fires before window.load, when the entire HTML document, but not necessarily its images, stylesheets or other assets, has loaded.  Based on [6596].  [sam, Mislav Marohnić]
6   Example:
7     document.observe("contentloaded", function() {
8       $$("a").invoke("identify"); // give all <a> tags an ID
9     });
10
11 * Add Event.fire and Element.Methods.fire for firing custom events.  Prototype custom events piggyback on a real DOM event ("ondataavailable"), so they bubble and cancel.  You can fire custom events from any element, or fire global events on the document object.  Observe custom events just as you'd observe a regular DOM event.  [sam, Seth Dillingham]
12
13 * Extend the event object with methods from Event.Methods and normalize it in IE.  [sam, Mislav Marohnić]
14
15 * Remove support for observing the capturing phase of DOM events, since we can't support it in all browsers.  [sam]
16
17 * Add Prototype.Browser.MobileSafari which evaluates to true on the iPhone's browser.  [sam]
18
19 * Optimize Selector#match and Element#match for simple selectors.  Closes #9082.  [Andrew Dupont]
20
21 * Remove the dependency on Element.ClassNames from Element#addClassName/removeClassName/toggleClassName, and deprecate Element.ClassNames. Closes #9073. [Tobie Langel]
22
23 * Make Element#wrap accept a second argument for setting attributes on the wrapper. Allow wrapping elements which are not part of the document. Closes #9071. [Tobie Langel]
24
25 * Improvements for Element#replace, Element#update and Element#insert.  Closes #7429, #9060.  [Tobie Langel]
26   - Element#replace/update/insert uses the argument's toElement or toHTML method if present (toElement has precedence if both are present).
27   - Element#replace and Element#update now also accept DOM elements.
28   - Element#replace better handles table-related elements in IE and Opera.
29  
30 * Add Object.isArray and Object.isElement (returns true if the object is a DOM node of type 1). [Tobie Langel]
31
32 * Add Object.toHTML (uses the object's toHTML method if present or else passes the object to String.interpret). [Tobie Langel]
33
34 * Make Element#setStyle accept a string argument of CSS rules. Deprecate uncamelized style property names when setting styles using an object (for performance reasons).  Closes #9059.  [Tobie Langel]
35   Examples:
36     $('id').setStyle('font-size: 12px; float: left; opacity: 0.5');
37     $('id').setStyle({fontSize: '12px', cssFloat: 'left', opacity: 0.5});
38
39   !! BACKWARDS COMPATIBILITY CHANGE !!
40  
41   If you have code that looks like this:
42     $('id').setStyle({'font-size': '12px'});
43   You need to replace it with either of the following:
44     $('id').setStyle({fontSize: '12px'});
45     $('id').setStyle('font-size: 12px;');
46
47 * Add Element#identify, which returns the element's ID if it exists, or sets and returns a unique, auto-generated ID (of the form "anonymous_element_" + auto-incremented digit) otherwise.  Use this when you need to ensure an element has an ID.  Closes #9012.  [Jeff Watkins, sam, Tobie Langel]
48
49 * Make Element#readAttribute work for cloned elements in IE. Closes #8481. [chem, Tobie Langel]
50
51 * Template enhancements.  Closes #8166.  [Christophe Porteneuve]
52   - Added String#interpolate as a shortcut for new Template(...).evaluate(...).
53   - If you pass String#interpolate or Template#evaluate an object with a toTemplateReplacements() method, the return value of that method will be used as the replacement object.
54   - You can now substitute properties of template replacement values in template strings, using dot or bracket notation (or both).  Example:
55     "#{name.last}, #{name.first[0]}. (#{location})".interpolate({
56       name: { first: "Christophe", last: "Porteneuve" }, location: "Paris"
57     }) // "Porteneuve, C. (Paris)"
58
59 * Extended grep semantics.  The first argument to Enumerable#grep is now a "filter" (an object with a match() method) so you can now e.g. filter an array of DOM nodes by CSS selector.  RegExp#match is now an alias to RegExp#test, so grep can still be used to filter an array of strings with a regular expression.  Closes #7596.  [Christophe Porteneuve, sam]
60
61 * Make String#scan explicitly return a string. This prevents possible issues with methods expecting input data that is typeof == 'string'. Closes #6350. [AndrewRev, Tobie Langel]
62
63 * Add Array#intersect for set intersection. Returns a new array containing all items common to the array and the argument, with duplicates removed (clone of the Ruby & method).   [Thomas Fuchs]
64   Example:
65     [1,1,3,5].intersect([1,2,3]) -> [1,3]
66
67 * Rename Element#getElementsBySelector to Element#select and add alias for Element#getElementsBySelector.  [Thomas Fuchs]
68
69 * Add Element#adjacent as a shortcut to selecting all adjacent nodes (and their children) that match a CSS selector.  [Thomas Fuchs]
70
71 * Enhance the Enumerable and Array APIs to more closely match those of JavaScript 1.6 as implemented in Firefox 1.5.  Closes #6650, #8409.  [Mislav Marohnić, Sylvain Zimmer]
72   - Add Array#lastIndexOf, and change Array#indexOf not to overwrite the native method.
73   - Make Enumerable use Array.prototype.forEach instead of _each when possible (slight speed increase).
74   - Add "filter", "entries", "every", and "some" Array aliases.
75   - All Enumerable methods now have an additional parameter, "context", which, if present, specifies the object to which the iterators' "this" is bound.
76   - Function#bind and #curry now return the receiving function if the binding object is undefined.
77
78 * Temporary workaround for Prototype.BrowserFeatures.SpecificElementExtensions incorrectly evaluating to true on iPhone. (needs further investigation)  [sam]
79
80 * The action for Form#request defaults to the current URL if the "action" attribute is empty. (This is what most of the major browsers do.) Fixes #8483. [Tomas, Mislav Marohnić]
81
82 * In form serialization, change the way submit buttons are handled. Previously all submit buttons were serialized; now Prototype serializes only the first one. Change Form#serialize and Form.serializeElements to accept a params hash. With the "hash: false" option, a serialized string is returned instead of the hash data object. With the "submit: 'foo'" option, only the submit button with the name "foo" is serialized.  References #5031.  [Mislav Marohnić]
83   Examples:
84     $('form').serialize({ submit: 'delete' })
85     $('form').serialize({ hash: false }) //-> equivalent to $('form').serialize()
86
87 * Form#findFirstElement respects HTML tabindexes.  Closes #7595.  [Christophe Porteneuve]
88
89 * Added Form.Element#setValue method for setting values on various form controls. Checkboxes and radio buttons respond to a boolean and multiple select boxes expect an array of values.  Closes #5902.  [Jonathan Viney, Mislav Marohnić]
90   Examples:
91     $('text_input').setValue('hello world!')
92     $('remember_me').setValue(true)
93     $('attend_classes').setValue(['cheese rolling', 'evil chemistry'])
94
95 * Make document.getElementsByClassName match a subset of the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 (http://www.whatwg.org/specs/web-apps/current-work/#getelementsbyclassname). It now supports multiple class names given as a whitespace-separated list in a string. Array argument is not supported. The method will only return the nodes that match all the class names. In browsers that implement the method natively it will not be overwritten.  Closes #8401.  [Mislav Marohnić]
96   Example:
97     document.getElementsByClassName('foo bar')
98
99 * Fix a Safari rendering issue when floating elements could temporarily disappear when opacity was set to 1.  Closes #7063.  References #3044, #3813, #6706.  [Thomas Fuchs, davidjrice]
100
101 * Prevent a crash in Safari when calling String#evalJSON(true) on very large strings. Add String#isJSON.  Closes #7834.  [Tobie Langel]
102
103 * Prevent a crash in Safari 1.3 on String#stripScripts and String#extractScripts.  Closes #8332.  [grant, Tobie Langel]
104
105 * Allow JSON data to contain line breaks.  Closes #8271.  [pijyster, Tobie Langel]
106
107 * Add Hash.prototype.index which returns the first found property that has a specific value.  Closes #8528.  [Thomas Fuchs, slusarz, Mislav Marohnić]
108   Examples:
109     var hash = $H({a:1,b:'2'});
110     hash.index(1)   // -> 'a'
111     hash.index('1') // -> undefined
112
113 * Ensure HTMLElement exists before creating Element.extend.  [Tobie Langel]
114
115 * Add Number.prototype.round/ceil/floor/abs as an aliases to the respective methods in Math. Refactor to seperate number extensions from base.js.  [Thomas Fuchs]
116
117 * Make Element#absolutize and Element#relativize properly use Element#getStyle.  Closes #8580.  [Christophe Porteneuve]
118
119 * Test library fixes: make rake dist work on Windows, only teardown if a browser is supported.  Closes #8463, #8498.  [Mislav Marohnić, grant]
120
121 * Change Element.insert syntax to allow multiple positions.  [Thomas Fuchs]
122   Examples:
123     Element.insert('foo', {top:'bar', bottom:'baz'});
124     $('foo').insert({after: new Element('p').update('bar')});
125     Element.insert('foo', new Element('p').update('bar')); // defaults to bottom
126     Element.insert('foo', 'bar'); // defaults to bottom
127
128 * String.prototype.truncate now explicitly converts its return value into a string if no truncation takes place. This prevents possible issues with methods expecting input data that is typeof == 'string'.  [Thomas Fuchs, Tobie Langel, Sam Stephenson]
129
130 * Event.findElement behaves as expected when the element passed matches the given selector.  Closes #8395.  [Mislav Marohnić, Tobie Langel]
131
132 * Element.setOpacity now calls removeAttribute on the filter style on IE if no more filters remain, which makes Cleartype work properly.  Closes #8376.  [alexdemi, Thomas Fuchs]
133
134 * Event.findElement now uses Element#up (and as a result can take a CSS selector instead of just a tag name).  [Tobie Langel]
135
136 * Minor cleanup of the position methods  [sam]
137
138 * Fix Element#clonePosition to call viewportOffset.  Closes #8372.  [graemenelson, Christophe Porteneuve]
139
140 * Prevent an error being thrown by $$ when #id does not exist in $$("div #id").  Closes #8325.  [Tobie Langel, ecke]
141
142 * Make Prototype.ScriptFragment behave when including Prototype inline.  [Christophe Porteneuve]
143
144 * Deprecate Position (kept for backwards compatibility). Add Element#cumulativeOffset, Element#positionedOffset, Element#absolutize, Element#relativize, Element#cumulativeScrollOffset, Element#getOffsetParent, Element#viewportOffset and Element#clonePosition. [Christophe Porteneuve]
145
146 * Make Element#update and Element#insert work for SELECT tags in IE and Opera. [Tobie Langel]
147
148 * Make Element#insert and Element#update better handle TABLE related elements in IE and Opera. Closes #7776, #8040, #7550, #7776, #7938. [Tobie Langel]
149
150 * Make Element#readAttribute('title') work in Opera. [Tobie Langel]
151
152 * Make Element#replace work with form elements in Firefox and Safari. Closes #8010, #7989. [dsl239, Tobie Langel]
153
154 * Add Element#wrap which wraps the element inside a new one. Closes #5732. [P. Vande, Tobie Langel]
155
156 * Make Element into a constructor: new Element(tagName, attributes). Add Element#writeAttribute which accepts a hash of attributes or a name/value pair. Closes #7476. [Mislav Marohnić, haraldmartin, Tobie Langel]
157
158 * Insertion overhaul: Add Element.insert(content[, position = 'bottom']). Deprecate Insertion (kept for backwards compatibility). Make Ajax.Updater option.insertion accept both Insertion.Top or the now preferred 'top'. Closes #7907. [Tobie Langel]
159
160 * Refactor Element.extend and eliminate Element.extend.cache.  [sam]
161
162 * Add Function#curry, Function#delay, Function#defer, and Function#wrap.  Closes #8134.  [Andrew Dupont, Tobie Langel, sam]
163
164 *1.5.1* (May 1, 2007)
165
166 * Don't duplicate the event argument in Function#bindAsEventListener.  Closes #6497.  [wiktor]
167
168 * Fix Selector :not-clause chaining.  [Andrew Dupont]
169
170 *1.5.1_rc4* (April 27, 2007)
171
172 * Fix $F breakage from [6598].  [sam]
173
174 * Set window.$continue to an Error with a helpful message for anyone who may still be using "throw $continue".  [sam]
175
176 * Fix jstest.rb IE support so you don't have to close the IE window after each test (yay!).  Closes #8207.  [Ryan Schuft]
177
178 * Fix jstest.rb Konqueror support.  Closes #7140.  [Christophe Porteneuve]
179
180 * Fix regression in which no-argument calls to Element.addMethods() would not add the methods defined in Form.Methods and Form.Element.Methods.  Closes #8206.  [Tobie Langel, fwittekind]
181
182 * Fix Element#readAttribute to work with the 'type' attribute in IE.  Closes #8160.  [Tobie Langel, Wiktor Ihárosi]
183
184 *1.5.1_rc3* (April 24, 2007)
185
186 * Add Element#childElements as an alias for Element#immediateDescendants.  [Tobie Langel]
187
188 * Optimize DOM navigation methods (Element#up, Element#down, Element#previous, Element#next) for no-argument calls.  Closes #7848.  [haraldmartin, sam]
189
190 * Add Element#firstDescendant to retrieve the first non-text child node of an element.  [sam]
191
192 * Element.addMethods should add methods to Element as well as Element.Methods.  Closes #7888.  [Andrew Dupont]
193
194 * Add support for per-request onCreate callbacks to Ajax.Request.  Closes #8011.  [Andrew Dupont]
195
196 * Don't call evalResponse() when an Ajax response has no Content-type header.  Closes #7827.  [Tobie Langel]
197
198 * Automatically strip security delimiter comments from JSON strings before evaling them.  The default delimiter is '/*-secure- ... */' or you can specify your own with the Prototype.JSONFilter regular expression.  If you wrap your JSON response bodies in this delimiter on the server side, rogue external sites can't hijack potentially sensitive data via <script> tags.  Closes #7910.  [Tobie Langel]
199   For more details on potential security problems, see: http://www.fortifysoftware.com/servlet/downloads/public/JavaScript_Hijacking.pdf
200
201 * Add extra spacing so Array#toJSON and Hash#toJSON generate YAML-loadable JSON.  Closes #7883.  [Andrew Dupont]
202
203 * Fix Form.request for forms containing an input element with name="action".  Closes #8063.  [Thomas Fuchs, Mislav Marohnić]
204
205 * Make Event.element extend the returned element.  Closes #7870.  [Thomas Fuchs]
206
207 * Prevent a crash on Safari on String.prototype.stripScripts and extractScripts with large <script> tags.  [Thomas Fuchs]
208
209 * Prevent linefeed normalisation in String.prototype.escapeHTML and unescapeHTML on IE for consistency with other browsers. Speed optimizations for Safari and IE.  [Thomas Fuchs]
210
211 * Make Hash.toQueryString serialize undefined values. Ensure consistency with String.prototype.toQueryParams.  Closes #7806.  [Mislav Marohnić]
212   Examples:
213     $H({a:'b',c:undefined}).toQueryString()      -> 'a=b&c'
214     $H({a:'b',c:null}).toQueryString()           -> 'a=b&c='
215     $H('a=b&c'.toQueryParams()).toQueryString()  -> 'a=b&c'
216     $H('a=b&c='.toQueryParams()).toQueryString() -> 'a=b&c='
217    
218 * Fix issues with Selector an+b logic, :not support, attribute selector double quotes, plus performance improvements.  Closes #7873, #7901.  [Andrew Dupont]
219
220 * Fix Form.disable to work again on non-form elements.  Closes #6887.  [Mislav Marohnić]
221
222 * Fix an issue with String.prototype.endsWith.  Closes #7822.  [altblue]
223
224 *1.5.1_rc2* (March 12, 2007)
225
226 * Add a tab character via innerHTML to the selector whitespace test.  [Christophe Porteneuve]
227
228 * Add an attribution to YUI-Ext's DomQuery in selector.js.
229
230 * Make Element.extend work on IE for Nodes with the same ID that where discarded.  Closes #7497.  [Mislav Marohnić, Thomas Fuchs]
231
232 * Make Selector correctly extend the first element it returns on IE.  [Thomas Fuchs]
233
234 * Prevent a crash in Safari when using $A() on NodeList objects that contain text nodes.  [Thomas Fuchs]
235
236 * Fix Element.Methods.descendants() to properly extend elements on IE.  [Thomas Fuchs]
237
238 *1.5.1_rc1* (March 9, 2007)
239
240 * Fix readAttribute for IE7. [Andrew Dupont]
241
242 *1.5.1_rc0* (March 8, 2007)
243
244 * Merge the selector branch into trunk, bringing vast performance improvements, bug fixes, and near-complete CSS3 compliance to $$ and Selector.  Closes #7568.  [Andrew Dupont]
245   Selector speed test: http://andrewdupont.net/test/double-dollar/
246
247 * Add support for JSON encoding and decoding.  Closes #7427.  [Tobie Langel]
248
249 * Fix double escaping of query parameters in Hash.prototype.toQueryString, and prevent Safari from iterating over shadowed properties when creating hashes.  Closes #7421.  [Tobie Langel, Mislav Marohnić]
250
251 * Fix simulated attribute reading for IE for "href", "src" and boolean attributes.  [Mislav Marohnić, Thomas Fuchs]
252
253 * Form.Element.disable() will now call blur(), removed blur() call from Form.Element.enable().  Closes #6034.  [tdd]
254
255 * Optimize document.getElementsByClassName and finalize DOM performance optimization refactoring.  Closes #6696.  [Mislav Marohnić]
256
257 * Fix an issue with serializing empty array inputs.  Closes #7516.  [stakadush, Mislav Marohnić]
258
259 * Add optional third parameter "camelized" to Element.setStyle, for optimized performance if style names are known to be camelCased.  [Thomas Fuchs]
260
261 * Fix a bug in the simulated hasAttribute for IE due to getAttributeNode sometimes returning null.  [sam]
262
263 * Optimize Element.getStyle and add new Element.getOpacity method. Special case IE and Opera getStyle methods.  Closes #7648.  [Tobie Langel, Thomas Fuchs]
264
265 * Optimize Element.setStyle and add new Element.setOpacity method, special case IE and Gecko opacity methods.  Closes #7585.  [savetheclocktower]
266
267 * Add unified Browser detection by providing Prototype.Browser.(IE|Gecko|WebKit|Opera) booleans.  Closes #6800.  [savetheclocktower]
268
269 * Add String.prototype.empty and String.prototype.blank (tests if empty or whitespace-only).  Closes #7016.  [Jonathan Viney, Thomas Fuchs]
270
271 * Update README to reflect new URLs, update LICENSE copyright years.  Closes #7426.  [Tobie Langel]
272
273 * Array.prototype.uniq optimization.  Closes #7417.  [Christophe Porteneuve]
274
275 * String.prototype.endsWith should not fail on multiple occurrences.  Closes #7416.  [Christophe Porteneuve]
276
277 * 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]
278
279   Options passed to request() are intelligently merged with the underlying Ajax.Request options:
280   - 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".
281   - 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.
282
283 * Fix $(form).serialize() in Safari and add support for extending specific tags to Element.addMethods.  Closes #7358.  [Andrew Dupont]
284
285 * Add String.prototype.startsWith, String.prototype.endsWith, and String.prototype.include.  Closes #7075.  [Tobie Langel]
286
287 * Improve performance of String.prototype.escapeHTML by using a cached div and text node.  Closes #6937.  [altblue]
288
289 * Make setStyle() with opacity: 0 in Internet Explorer work correctly.  [Thomas Fuchs]
290
291 * Form.Element.activate shouldn't raise an exception when the form or field is hidden.  [sam]
292
293 * Remove support for "throw $continue" in Enumerable.  Use "return" instead.  [sam]
294
295 * Update HEADER to reflect new URL.  [sam]
296
297 *1.5.0* (January 18, 2007)
298
299 * Add test to ensure Content-type header is set for simulated verbs.  [sam]
300
301 * Fix Content-Type header for HTTP methods simulated with POST not defaulting to application/x-www-form-urlencoded.  [Thomas Fuchs]
302
303 * Simplify form serialization and add support for fields with the same name as Hash methods.  Closes #6649.  [Mislav Marohnić]
304
305 * Fix attribute selectors for IE.  Closes #5170.  [Tobie Langel, Andrew Dupont]
306
307 * A slew of dom.js improvements.  Closes #4217, #6589, #7001.  [Tobie]
308   - Fix Element.getDimensions() for hidden elements, make Element.getHeight() use .getDimensions()
309   - Add Element.getWidth()
310   - Make Element.replace() call .toString() on the html argument (alike .update())
311   - Fix an issue with Element.get/setStyle() and Safari with 'float'
312   - Add a bunch of missing unit tests
313
314 * Fix an issue with Element.setStyle({opacity:''}) setting the opacity to 0 instead of removing the set inline opacity style.  [Thomas Fuchs]
315
316 * Ensure Ajax.Request's evalResponse is called before onComplete so that onComplete can reference any elements created during the response.  Closes #6727.  [jonathan]
317
318 * Ensure the WEBrick test runner sets the correct Content-Type for tests and fixtures. [sam]
319
320 * 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]
321
322 * Make selectors match forms that have an element with name="id" correctly, fixes #5759 [mislav]
323
324 * Remove support for HTTP authorization in Ajax calls introduced with #6366.  Closes #6638 [jmecham]
325
326 * Add Enumerable.size() to count elements in an enumerable and the corresponding Array.size() method, fixes #6710 [ZenCocoon]
327
328 * Add String.succ() method to allow for String ranges, fixes #6037 [Cory Hudson, mislav]
329   Examples:
330     'abcd'.succ();                                   -> 'abce'
331     $R('a','d').map(function(char){ return char; }); -> ['a','b','c','d']
332
333 * Make Element.scrollTo() correctly consider offsets of parent DOM nodes, fixes #6625 [ohader, savetheclocktower]
334
335 * Fix Enumerable.inGroupsOf() to correctly work with fill values that evaluate to false, fixes #6782 [hawk]
336
337 * Remove/cleanup redundant $() calls in dom.js, fixes #6817 [Tobie]
338
339 * Don't cache files in automatic unit tests, fixes #6218 [voidlock]
340
341 * Add $w() to easily create arrays from strings like Ruby's %w, fixes #5682 [glazedginger, brendon.aaron]
342
343 * Add Element.toggleClassName() to toggle CSS classes on elements, fixes #6759 [Tobie]
344
345 * Make Form.getInputs always return an array for consistency, fixes #6475 [Justin Gehtland, savetheclocktower]
346
347 * Make TimedObserver work correctly for SELECT MULTIPLE elements, fixes #6593 [clemos, tdd]
348
349 * 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]
350
351 * Make Element.getStyle() work with camelCased argument, fixes #6686 [Tobie]
352
353 * Fix a redundant check in Array.prototype.compact, fixes #4739 [wlodarcz, mislav]
354
355 * Fix $() to correctly pass back the results of document.getElementById(), notably returning "null" on elements not found, fixes #6582 [adsmart]
356
357 * Change/add assertNull, assertUndefined, assertNullOrUndefined and not-* variants in unittest.js, fixes #6582 [adsmart]
358
359 * Cleanup String.prototype.camelize, fix an issue with String.prototype.underscore, fixes #4714, #6685 [Tobie, Thomas Fuchs]
360
361 * Add String.prototype.capitalize, which returns a string with the first character in upper case, fixes #6666 [Tobie]
362
363 * Make Element.getStyle() and Element.setStyle() handle the CSS 'opacity' property transparently in IE, fixes #6093 [brandon.aaron, Tobie]
364
365 * Fix handling of CSS 'float' property for Element.getStyle() and Element.setStyle(), fixes #4160 [Thomas Fuchs, ericf]
366
367 * Fix that onComplete would be called twice with synchronous Ajax requests on Safari (provides units tests for #5756) [Thomas Fuchs]
368
369 * Fix Form.Field.activate to not select text on buttons in IE, fixes #2653 [sutch, mislav, Thomas Fuchs]
370
371 * Fix String.unescapeHTML() on Firefox for strings that are longer than 2048 bytes, fixes #5789 [Paul Moers, Thomas Fuchs]
372
373 * Redefine Array.prototype.concat for Opera, as the native implemenation doesn't work correctly [Thomas Fuchs]
374
375 * Add unit tests for Function.prototype.bind() [Thomas Fuchs]
376
377 * Add String.prototype.underscore and String.prototype.dasherize [Thomas Fuchs]
378   Examples:
379     'Hello_World'.dasherize()                    -> 'Hello-World'
380     'borderBottomWidth'.underscore()             -> 'border_bottom_width'
381     'borderBottomWidth'.underscore().dasherize() -> 'border-bottom-width'
382
383 *1.5.0_rc2* (November 11, 2006)
384
385 * Ensure that existing DOM properties take precedence over extended element methods in all browsers.  Closes #5115.  [Sean Kleinjung, sam]
386
387 * 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]
388   Example:
389     <div id="widgets">
390       <div class="widget" widget_id="7">...</div>
391       <div class="widget" widget_id="8">...</div>
392       <div class="widget" widget_id="9">...</div>
393     </div>
394    
395     $$('div.widget').invoke('readAttribute', 'widget_id')
396     // ["7", "8", "9"]
397
398 * Add Element.Methods.immediateDescendants, like $A($(element).childNodes) but without text nodes.  [sam]
399
400 * More consistency.  Closes #6573.  [Bob Silva]
401
402 * String.prototype.toQueryParams and Hash.prototype.toQueryString now properly serialize arrays as multiple values.  Closes #4436.  [mislav, altblue, L`OcuS]
403
404 * Fix Form.serialize for options with empty values.  Closes #5033. [tdd, Thomas Fuchs, sam]
405
406 * Add Element.Methods.Simulated for simulating HTMLElement methods in lesser browsers.  Add hasAttribute as the first simulated method.  [tdd, Thomas Fuchs, sam]
407
408 * Add a "retry with throw" button for test error messages. [sam]
409
410 * rake test now runs test/unit/*.html by default.  Additionally, you can specify individual tests to run with the TESTS environment variable, and you can restrict the tests to particular browsers using the BROWSERS environment variable. [sam]
411
412   Examples:
413     % BROWSERS=safari,firefox rake test
414     % TESTS=dom rake test
415
416 * Element.hasClassName now bypasses the Element.ClassNames API for performance.  [sam]
417
418 * Pick some low-hanging performance and DRYness fruit.  [sam]
419   - Inline length property accesses in for loops
420   - Enumerable-ize for loops where it makes sense
421   - Make better use of Element.Methods and Form.Methods/Form.Element.Methods
422
423 * A slew of Ajax improvements.  Closes #6366.  [mislav, sam]
424  
425   Public-facing changes include:
426   - HTTP method can be specified in either lowercase or uppercase, and uppercase is always used when opening the XHR connection
427   - Added 'encoding' option (for POST) with a default of 'UTF-8'
428   - Ajax.Request now recognizes all the JavaScript MIME types we're aware of
429   - PUT body support with the 'postBody' option
430   - HTTP authentication support with the 'username' and 'password' options
431   - Query parameters can be passed as a string or as a hash
432   - Fixed both String.toQueryParams and Hash.toQueryString when handling empty values
433   - Request headers can now be specified as a hash with the 'requestHeaders' option
434
435 * Improve performance of the common case where $ is called with a single argument. Closes #6347. [sam, rvermillion, mislav]
436
437 * Fix Object.inspect to correctly distinguish between null and undefined, fixes #5941 [tdd, mislav]
438
439 * Don't serialize disabled form elements, fixes #4586 [tdd]
440
441 * Make HTML element classes extension mechanism for Safari not throw errors on WebKit beta versions [Thomas Fuchs]
442
443 * Add support for using Element.update() with no or a non-string parameter [Thomas Fuchs]
444
445   Example:
446     $('empty_me').update()          -> clears the element
447     $('easy_as').update(123)        -> set element content to '123'
448
449 * Add unit tests for hashes, fixes #6344 [Tobie Langel]
450
451 * Add clone() method to arrays, fixes #6338 [Tobie Langel]
452
453 * Backing out of [5194] (Element.clear) because of issues with IE on certain elements, #6051
454
455 * Add Element.clear for easily emptying out elements, fixes #6051 [brandon.aaron@gmail.com]
456
457 * Enumerable.each now returns the enumerable to allow for method chaining, fixes #6250 [eventualbuddha]
458
459 * Make makeClipping and undoClipping always return their element to stay chainable
460
461 * Fix an issue with certain Element chain calls not correctly extending elements with Prototype element methods on IE [Thomas Fuchs]
462
463 * Add Enumerable.eachSlice and Enumerable.inGroupsOf, fixes #6046 [rails@tddsworld.com, Thomas Fuchs]
464
465   Example:
466     [1,2,3,4,5].inGroupsOf(3)       -> [[1,2,3],[4,5,null]]
467     [1,2,3].inGroupsOf(4,'x')       -> [[1,2,3,'x']]
468
469 * Complete unit tests for array.js and string.js [Thomas Fuchs]
470
471 * Performance improvements for document.getElementsByClassName, including querying with XPath in supported browsers. [Andrew Dupont]
472
473 * Make Form.getElements() return elements in the correct order, fix broken Form.serialize return, fixes #4249, #6172 [lars@pinds.com, Thomas Fuchs, john]
474
475 * Add various DOM unit tests, fixes #6176, #6177 [tdd]
476
477 * Split Form.serialize into Form.serialize and Form.serializeElements. The latter can be used stand-alone to serialize an array of elements you pass in, instead of the entire form [DHH]
478
479 * Form.Element.disable() and .enable() will now work correctly, fixes #6034 [dresselm@businesslogic.com]
480
481 * Fix IE and Safari issues with Position.positionedOffset, add position.html unit tests, fixes #5621 [renggli@iam.unibe.ch]
482
483 * Fix an issue with Element.undoClipping and IE [Thomas Fuchs]
484
485 * Element.cleanWhitespace now correctly removes consecutive empty text nodes, fixes #3209 [livier.duroselle@gmail.com]
486
487 * Element.extend now does not try to extend text nodes, fixes #4642 [siegfried.puchbauer@gmail.com]
488
489 *1.5.0_rc1* (September 4, 2006)
490
491 * bindAsEventListener now passes along any provided arguments after the event argument.  Closes #5508.  [todd.fisher@revolution.com]
492
493 * Fix makeClipping and undoClipping with local overflow style values other than visible and hidden, fixes #3672  [Thomas Fuchs]
494
495 * Add Element.up, Element.down, Element.previous, and Element.next for easily traversing the DOM.  (Inspired by Thomas Fuchs' original implementation of Element.up: http://pastie.caboo.se/7702) [sam]
496
497   Examples:
498     <div id="sidebar">                  -> $('nav').up() or $('menu').up('div')
499       <ul id="nav">                     -> $('sidebar').down()  or $('sidebar').down('ul') or $('menu').previous()
500         <li>...</li>                    -> $('sidebar').down(1) or $('sidebar').down('li')
501         <li>...</li>                    -> $('sidebar').down(2) or $('sidebar').down('li', 2) or $('sidebar').down('li').next('li')
502         <li class="selected">...</li>   -> $('sidebar').down('li.selected')
503       </ul>                             
504       <ul id="menu">                    -> $('sidebar').down('ul').next()
505         ...
506
507 * Refactor $$ and Element.getElementsBySelector into Selector.findChildElements. [sam]
508
509 * Add Element.match, which takes a single CSS selector expression and returns true if it matches the element. [sam]
510
511 * Add Element.ancestors, Element.descendants, Element.previousSiblings, Element.nextSiblings, and Element.siblings. [sam]
512
513 * Add Element.inspect for better DOM debugging. [sam]
514
515 * Add an optional boolean argument to String.prototype.inspect which, when true, makes the string double-quoted instead of single-quoted. [sam]
516
517 * Add the uniq() method to Arrays, which returns a new Array with duplicates removed, fixes #3810 [secondlife]
518
519 * Add stop() method to PeriodicalExecutor, fixes #4801 [Jon Evans]
520
521 * Fix issues with Enumerable.any, ObjectRange.toArray, added unit tests, fixes #4419 [miyamuko, Thomas Fuchs]
522
523 * Fix two instances of unneccesarily redeclared variables, fixes #5229 [Thomas Fuchs]
524
525 * Fix a loop in Element.extend to properly use local variable, fixes #5128 [arrix]
526
527 * Add constants for additional keys in Event, fixes #5411, #5795 [simone_b]
528
529 * Workaround a DOM API bug in Opera in Position.page(), fixes #2407, #5848 [Thomas Fuchs]
530
531 * Remove duplicate definition of Position.clone(), fixes #3765 [Thomas Fuchs]
532
533 * Make destructive Element, Form, and Form.Element methods return their first argument, so that multiple calls can be chained together. [sam]
534
535   ex. $("sidebar").addClassName("selected").show();
536
537   The following methods now return their first argument: Element.toggle, Element.hide, Element.show, Element.remove, Element.update, Element.replace, Element.addClassName, Element.removeClassName, Element.observe, Element.stopObserving, Element.cleanWhitespace, Element.scrollTo, Element.setStyle, Element.makePositioned, Element.undoPositioned, Element.makeClipping, Element.undoClipping, Form.reset, Form.disable, Form.enable, Form.focusFirstElement, Form.Element.focus, Form.Element.select, Form.Element.clear, Form.Element.activate, Form.Element.disable, Form.Element.enable.
538
539 * For consistency, Element.toggle, Element.show, Element.hide, Field.clear, and Field.present no longer take an arbitrary number of arguments. [sam]
540  
541   !! BACKWARDS COMPATIBILITY CHANGE !!
542  
543   If you have code that looks like this:
544     Element.show('page', 'sidebar', 'content');
545   You need to replace it with code like this:
546     ['page', 'sidebar', 'content'].each(Element.show);
547
548 * Mix in Form and Form.Element methods to forms and form field elements with $() and $$(). Closes #4448. [Dan Webb, sam]
549
550 * Add Object.clone [sam]
551
552 * Add Form.Element.disable and Form.Element.enable. Closes #4943. [jan@prima.de]
553
554 * Field is now simply an alias for Form.Element. [sam]
555
556 * Add Element.Methods.getElementsByClassName and Element.Methods.getElementsBySelector. Closes #4669. [Andrew Dupont, DHH, sam]
557
558 * Avoid race condition when stopping an Ajax.PeriodicalUpdater. Closes #4809. [e98cuenc@gmail.com]
559
560 * Improve support for synchronous requests. Closes #5916. [sam, jthrom@gmail.com]
561
562 * Add serialization and observation support for input type=search. Closes #4096. [rpnielsen@gmail.com]
563
564 * Properly decode query components in String.prototype.toQueryParams. Closes #3487. [sam]
565
566 * Add Array.prototype.reduce [sam]:
567   [1, 2].reduce()   // [1, 2]
568   [1].reduce()      // 1
569   [].reduce()       // undefined
570
571 * Add Object.keys and Object.values [sam]
572
573 * Simulate non-GET/POST requests by POSTing with a _method parameter set to the actual verb [DHH]
574
575 * Make Element.update() handle TABLE-related elements with the DOM API because of IE's missing .innerHTML property on them [Thomas Fuchs, thx to Rick Olson]
576
577 * Sync to script.aculo.us unittest.js library as of 2006/08/29 [Thomas Fuchs]
578
579 * Add additional unit tests to test/unit/dom.html for testing Element.update and $().update in various enviroments [Thomas Fuchs]
580
581 * Prevent possible exceptions on unloading the page in IE [Thomas Fuchs]
582
583 *1.5.0_rc0* (April 5, 2006)
584
585 * Modify HTMLElement.prototype and short-circuit Element.extend where possible. Closes #4477. [Thomas Fuchs]
586
587 * Only observe window.onunload in IE for Mozilla bfcache support. Closes #3726. [Mike A. Owens]
588
589 * Don't redefine Array.prototype.shift. Closes #4138. [leeo]
590
591 * Prevent redefining Array.prototype.reverse more than once. Closes #3951. [brettdgibson@gmail.com]
592
593 * Fix Enumerable.min/Enumerable.max to recognize the value 0. Closes #3847, #4190. [rubyonrails@brainsick.com, Martin Bialasinski]
594
595 * Change Ajax.getTransport to prefer XMLHttpRequest in anticipation of IE 7. Closes #3688. [jschrab@malicstower.org, sam]
596
597 * Make Array.prototype.flatten more robust. Closes #3453. [Martin Bialasinski, sam]
598
599 * Fix evalScripts from crashing Firefox if script includes 'var'. Closes #3288, #4165. [rahul@ntag.com, sam]
600
601 * Scope iterators locally. Closes #4589. [sam]
602
603 * Support Insertion.Before/Insertion.After for <tr> elements in IE. Closes #3925. [rails-venkatp@sneakemail.com]
604
605 * Add a contentType option for overriding application/x-www-form-urlencoded in Ajax.Request. Closes #3564. [avif@arc90.com, sam]
606
607 * Surround values in the X-JSON header in parenthesis for better compatibility with Firefox. Closes #4118. [bigsmoke@gmail.com]
608
609 * Fix Form.serialize to properly encode option values in multiple selects in IE. Closes #3291. [rubyonrails@brainsick.com]
610
611 * Cache methods added to DOM elements with Element.extend to prevent memory leaks in IE. Closes #4465. [jaen@laborint.com, sam]
612
613 * 1.5.0_pre1* (March 26, 2006)
614
615 * Add attribute selector support for Selector (and $$). Closes #4368. [devslashnull@gmail.com]
616   Example:
617     $$('form#foo input[type=text]').each(function(input) {
618       input.setStyle({color: 'red'});
619     });
620  
621 * Send Accept header containing 'text/javascript, text/html, application/xml, text/xml */*'' to inform Rails that we prefer RJS, but we'll take HTML or XML or whatever if you can't deliver the goods [DHH]
622
623 * Make $$ work in IE. Closes #3715. [rubyonrails@brainsick.com]
624
625 * Add test/browser.html, which provides a simple object browser for the Prototype source (Firefox/Safari only). [sam]
626
627 * Add Element.extend, which mixes Element methods into a single HTML element.  This means you can now write $('foo').show() instead of Element.show('foo').  $, $$ and document.getElementsByClassName automatically call Element.extend on any returned elements. [sam]
628
629 * Add Element.replace as a cross-browser implementation of the "outerHTML" property. References #3246. [tom@craz8.com]
630
631 * Fix Enumerable.zip iterator behavior. [Marcin Kaszynski, sam]
632
633 *1.5.0_pre0* (January 18, 2006)
634
635 * Add String.prototype.truncate to complement the Action View truncate helper. [sam]
636
637 * Add String.prototype.gsub, String.prototype.sub, and String.prototype.scan, all of which take a pattern and an iterator (or a pattern and a replacement template string in the case of gsub and sub). [sam]
638
639 * Add a Template class for interpolating named keys from an object in a string. [sam]
640
641 * Add the $$ function for finding DOM elements by simple CSS selector strings. [sam]
642   Example: Find all <img> elements inside <p> elements with class "summary", all inside
643            the <div> with id "page". Hide each matched <img> tag.
644              $$('div#page p.summary img').each(Element.hide)
645      
646 * Add a Selector class for matching elements by single CSS selector tokens. [sam]
647
648 * Add Test.Unit.Assertions.assertEnumEqual for comparing Enumerables in tests. [sam]
649
650 * Add Element.childOf(element, ancestor) which returns true when element is a child of ancestor. [sam]
651
652 * Fix escaping in String.prototype.inspect. [sam]
653
654 * Add String.prototype.strip to remove leading and trailing whitespace from a string. [sam]
655
656 * Move Prototype to Rails SVN. [sam]
657   http://dev.rubyonrails.org/svn/rails/spinoffs/prototype/
658  
659 * Make the console nicer. [sam]
660
661 * Prune the source tree. [sam]
Note: See TracBrowser for help on using the browser.