Find file
Fetching contributors…
Cannot retrieve contributors at this time
2727 lines (1565 sloc) 153 KB
* Follow spec and make fuse.ajax.Request check the response content-type header in a case-insensitive mannor. [jddalton]
* Ensure fuse.ajax.Request#responseXML is a valid XML object or null. [fabiomcosta, jddalton]
* Modify fuse.Array methods so they can be dumped to the global for Prototype emulation. [jddalton]
* Remove support for null callbacks from fuse.Array, fuse.Hash, and fuse.Class.mixins.enumerable methods. [jddalton]
Note: Backwards compatibility warning.
* Add fuse.dom.Element#destroy and fuse.dom.Element#purge. [FuseJS LH #71, #72] [jddalton]
* Add XHTML support for FuseJS. [jddalton]
* Make fuse.String escapeHTML()/unescapeHTML() escape only `<`, `>`, and `&` characters by default and escape more entities by passing a truthy `all` argument. [FuseJS LH #65] [jddalton]
* Allow decorator caching options to accept non null/undefined falsy values. [jddalton]
* Reduce recursion in the element cloner() function and make getScripts() absorb getByTagName(). [jddalton]
* Optimize NodeList modification methods by creating an element/fragment once instead of for each iteration. [jddalton]
* Add fuse.dom.HTMLElement and move HTML related methods from fuse.dom.Element to HTMLElement. [jddalton]
* Remove partial support for elements being passed to fuse.Object.toJSON(). [jddalton]
* Make fuse.dom.Element#show work with elements hidden by stylesheet rules. [jddalton Joe Gornick]
* Add table of default attribute values so fuse.dom.Element#getAttribute may consistently resolve them across browsers. [fabiomcosta, jddalton]
* Add ability to exit early from fuse.Object.each() by returning false from the callback and allow setting the `this` of the callback. [jddalton]
* Make fuse.Object.getClassOf() more closely follow the spirit of the specification and throw a TypeError when passed an undefined or null value. [jddalton, kangax]
* When in debug mode execute event handlers separately from the loop iterating over them allowing all handlers to execute despite errors that may be thrown. [jddalton]
* Add fuse.debug detection for the window's url containing `fusejs_debug` in the query or `debug` in the fusejs script src query to trigger debug mode. [jddalton]
Note: fuse.debug will take the value of debug query param. For example, if debug=2 then fuse.debug would equal 2.
* Fix Chrome Date#toJSON throwing errors when its result is not a primitive. [jddalton]
* Ensure decorators are created when fuse.dom.Element#observe is called with a raw element as its `this`. [jddalton, Joe Gornick]
* Avoid a conflict with the document's data id by initializing IE's unqiueNumber property on a dummy element. [jddalton]
* Change fuse.ajax.Updater `insertion` option to `updateBy`. [jddalton]
Note: Backwards compatibility warning.
* Make script injection via fuse.dom.Element modification methods execute synchronously. [jddalton]
* Add fuse.dom.Element methods. [jddalton]
- Add appendChildTo
- Add prependChildTo
- Add appendSiblingTo
- Add prependSiblingTo
* Rename fuse.dom.Element methods. [FuseJS LH #73] [jddalton]
- Rename append to appendChild
- Rename prepend to prependChild
- Rename insertAfter to appendSibling
- Rename insertBefore to prependSibling
* Fix fuse.Fusebox regression with Firefox 1.5 and Safari and cleanup. [jddalton]
* Simplify the private from() function in Fusebox. [jddalton]
* Reduce the prototype chain method lookup by one for the __proto__ fork of Fusebox. [jddalton]
* Allow fuse.Array constructor to throw errors if its passed an invalid length. [jddalton, kangax]
* Remove method wrapping for fuse.Array#sort in the __proto__ fork of Fusebox. [jddalton]
* Reduce the use of strict === in favor of loose ==. [Dmitry Baranovskiy, jddalton]
* Rename private `global` variable to `window` so selector engine adapters can be used outside of the primary closure. [jddalton]
* Avoid an extra fromElement() call in the fast lane of fuse.Event#findElement. [jddalton]
* Add global eval solution, rename fuse.String#evalScripts to fuse.String#runScripts, and make runScripts() callback arguments mimic ES5 callbacks. [FuseJS LH #59] [jddalton]
* Remove fuse.RegExp#match alias of fuse.RegExp#test. [jddalton]
Note: Backwards compatibility warning.
* Rename String methods and move HTML related String methods to html.js. [jddalton, Joe Gornick]
- Rename fuse.String#times to fuse.String#repeat
- Rename fuse.String#blank to fuse.String#isBlank
- Rename fuse.String#empty to fuse.String#isEmpty
* Ensure `reStrict`, used in Fusebox, detects the strict mode directive correctly. [jddalton, kangax, Kit Goncharov]
* Add supplemental checks for the Firefox iframe issue with sandboxed natives. [jddalton]
* Add an adapter for DOMAssistant's CSS selector engine. [jddalton]
* Update selector engine adapters to use the build system's //= require command. [Diego Perini, jddalton, Tobie Langel]
* Make internal getNodeName() check for browsers that have case-sensitive nodeNames for unknown elements. [jddalton, Diego Perini]
* Add fuse.dom.Element.fromTagName(). [jddalton]
* Make Event#stop, Event#stopBubbling, and Event#cancel return the event wrapper to allow method chaining. [jdalton, Johan Arensman]
* Remove fuse.Array.create() in favor of using fuse.Array.from(3) when creating an array with one numeric value. [jddalton]
* Remove fuse.dom.Element.create() in favor of just calling fuse.dom.Element(). [jddalton]
* Fix Fusebox reference to postProcess() when it's redefined. [jddalton]
* Fix Fusebox memory leak associated with ActiveX technique. [jddalton, Sebastian Werner]
* Add fuse.Fusebox.getMode() and fuse.Fusebox.setMode() methods. [jddalton]
* Fix Firefox bug when adding and then removing iframes before dom load. [getify, jddalton]
* Rewrite Fusebox to use iframes by default. [jddalton]
* Fix IE8 bug with element.hasAttribute('selected') and other flagged attributes. [Diego Perini, jddalton]
* Further simplify the Ruby build system. [Kit Goncharov]
* Add all Scotch unit tests for `fuse.Array`. [Kit Goncharov]
* Add a lightweight version of Sprockets to `Build.rb` for building FuseJS. [Kit Goncharov]
* Switch to a pure-Ruby build system. [Kit Goncharov]
- To build FuseJS, run `ruby Build.rb -d` or `--dist`.
- To build the old unit tests, run `ruby Build.rb -t` or `--test`.
* Add fuse.Object.getClassOf() and provide a fallback in case {} fails to resolve sandboxed natives [[Class]]. [jddalton]
* Move fuse.Enumerable to fuse.Class.mixins.enumerable. [FuseJS LH #68] [jddalton]
* Add fuse.dom.Event._addDispatcher and rename other implied private methods. [jddalton]
* Add `skipDataInit` argument to fuse.dom.Node.getFuseId(). [jddalton]
* Add clone(deep) methods to Array, Element, Hash, Object, Number, Range, String, and Template. [FuseJS LH #18] [jddalton, Joe Gornick]
* Add caching/decorating options to fuse.dom.Element create(), from(), fromElement(), fromHTML(), and fromId(). [jddalton]
* Rename fuse.dom.getFragmentFromString() to fuse.dom.getFragmentFromHTML(). [jddalton]
* Add fuse.dom.Element methods fromId() and fromHTML(). [jddalton]
* Remove fuse.get() and fuse.getById(). [jddalton]
* Optimize event findElement(), getPointerX(), and getPointerX() methods by reducing the number of elements that are decorated. [jddalton]
* Make the IE `dom:loaded` event only use the doScroll() technique when using less than IE8. [jddalton]
* Change argument order in dom traversal methods. [jddalton]
New argument order for up/down/next/previous/first/last methods:
(/* empty */)
(count, selector)
(count, callback, thisArg)
(callback, thisArg)
* Make the readyState poller for the dom:loaded event fire sooner and avoid the poller if the window is already loaded. [jddalton]
* Move toQueryString() and toQueryParam() methods to /lang/query.js and remove `parseQuery` alias. [jddalton]
Note: Backwards compatibility warning.
* Rewrite fuse.ajax.responders and fuse.ajax.Request to use custom class events. [jddalton]
* Add support for custom events to fuse.Class via the fuse.Class.mixins.event mixin. [jddalton]
* Break array/object references on the prototype when calling a constructor that is defined with an `initialize` method on its prototype. [jddalton]
* Make fuse.Class automatically break array/object references assigned to the prototype of a constructor when using addPlugins() and addMixins(). [jddalton]
* Make fuse.Object.clone() work with Array, Boolean, Number, RegExp, and String objects. [jddalton]
* Make the event object passed to delegate() masquerade as that of the matched element and add getDelegator() to the event object. [jddalton]
* Remove fuse.$break and allow returning false to exit out of an iteration method. [jddalton]
* Remove fuse.Object methods _extend() and _each(). [jddalton]
* Expose fuse.Object.isHostType(object, property). [jddalton]
* Fix memory leak caused by the closure around the framework. [jddalton]
* Add fuse.dom.Element, Document, and Window methods delegate(type, selector, handler) and stopDelegating([type, selector, handler]). [jddalton]
* Add fuse.dom.Document match()/query() method and nodeType property. [jddalton]
* Add method generics to fuse.dom.Event and make isLeftClick(), isMiddleClick(), and isRightClick() lazy define themselves. [jddalton]
* Move fuse.K to fuse.Function.IDENTITY and add fuse.Function.TRUE/fuse.Function.FALSE shortcut functions. [jddalton]
Note: Backwards compatibility warning.
* Remove a reference to the window.document object in fuse.dom.Form#serializeElements. [jddalton]
* Ensure namespaces only inherit from the parent namespaces `plugin` property and not static properties. [jddalton]
* Reduce the number of private variables and standardize repeatedly used variable names for better minification. [jddalton]
* Wrap apply() and call() of Array and String methods to ensure `thisArg` is not null or undefined. [jddalton]
* Move fuse.emptyFunction to fuse.Function.NOOP and remove fuse.Object.isUndefined. [jddalton]
Note: Backwards compatibility warning.
* Separate the fuse.util methods into their own /lang/util.js file. [jddalton]
* Separate the ECMA specification bug fixes into their own /lang/ecma.js file. [jddalton]
* Remove fuse.String.interpret. [jddalton]
Note: Backwards compatibility warning.
* Fix window object detection for Safari 2.0 in fuse.dom.Window. [jddalton]
* Add a `raw` property to all wrapped sandboxed native methods to reference their original methods. [jddalton]
* Add support for proprietary opacity styles to setOpacity() and getOpacity(). [David Mark, jddalton]
* Make inspect() methods support iterating over objects that have their own generic inspect() method. [jddalton]
* Add native JSON support to the JSON methods and make them comply with ECMA specs. [FuseJS LH #22] [jddalton, Kit Goncharov, Tobie Langel]
* Optimize fuse.dom.Element modification methods and add append(), prepend(), insertBefore(), and insertAfter() methods. [FuseJS LH #53] [jddalton, kangax, Kit Goncharov]
* Add `defaults` object to constructors to store default properties / options. [jddalton, Thomas Aylott]
* Add fuse.dom.Event methods isStopped(), isCancelled(), isBubbling(), cancel(), stopBubbling(), and fuse.dom.Document method isLoaded(). [jddalton]
Note: Backwards compatibility warning.
* Fix fuse.Fusebox'ed Array#map when the SKIP_METHODS_RETURNING_ARRAYS true. [jddalton]
* Add fuse.dom.Event decorator and new Event API. [FuseJS LH#29] [Brandon Aaron, jddalton]
Note: Backwards compatibility warning.
* Ensure Fuse.Fusebox'ed String#search passes the correct arguments to its internal method. [jddalton]
* Make fuse.dom.Element statics extendByTag(), addPlugins(), and addMixins() automatically add methods to fuse.dom.NodeList's prototype. [jddalton]
* Ensure fuse(document).viewport works with documents from iframes. [jddalton]
* Fix cross-browser bugs with fuse.String match(), search(), split() and fuse.RegExp exec(), test(). [FuseJS LH #42] [jddalton, Kit Goncharov, Steve Levithan]
* Make the fuse.Fusebox'ed Object constructor, when called as a function and passed a native RegExp instance, return a Fuseboxed RegExp instance. [jddalton]
* Fix fuse.Template's cache and maintain compatibility with Prototype's Template class. [jddalton]
* Fix fuse.Fusebox'ed String#match and RegExp#exec to allow returning arrays containing undefined values. [jddalton]
* Fix Opera 9.25 bug with fuse.String#lastIndexOf and add new feature test `STRING_LAST_INDEX_OF_BUGGY_WITH_NEGATIVE_OR_NAN_POSITION`. [jddalton]
* Rewrite fuse.Template to parse the template once instead of each time parse() is called, rename evaluate() to parse(), and add support for replacing duplicate tokens. [jddalton, Mathias Baert, Yaffle]
Note: Backwards compatibility warning.
* Pass event object to EventObserver callbacks. [Prototype LH #150] [jddalton, Morus Walter]
* Confirm fuse.String#match and fuse.RegExp#exec don't return sparse arrays in Opera 9.25 or Safari 3.x. [Prototype LH #946] [jay, jddalton]
* Avoid setting style overflow via cssText in setStyle() because it causes bugs in IE and Konqueror. [jddalton, kangax]
* Support fallback for Safari 2.x event.isMiddleClick() support. [Prototype LH #731] [Arthur Schreiber, Frank, jddalton]
* Make setOpacity() method treat a value of 1 and an empty string differently. [Prototype LH #684] [david brillard, jddalton]
* Make setStyle() method avoid throwing errors when passing falsy values. [Prototype LH #558] [garrett, jddalton]
* Make setStyle() method support hyphenated style properties. [Prototype LH #970] [jddalton, zeno]
* Fix fuse.Fusebox wrappers for Number methods toExponential(), toFixed(), and toPrecision(). [jddalton]
* Add `fractionDigits` argument to fuse.Number#round. [Prototype LH #830] [jddalton, Radoslav Stankov]
* Ensure fuse.Fusebox Native methods that return arrays set index values in accending order so de facto order is preserved in for-in loops. [jddalton]
* Rename the fuse.dom.Data object to [jddalton]
* Avoid calling decorator instance method focus() in Form focusFirstControl(). [Diego Perini, jddalton]
* Make fuse.dom.InputElement.EventObserver registerCallback() method use fuse.get() to resolve the `element` argument. [jddalton]
* Rename Form methods getElements() to getControls(), findFirstElement() to getFirstControl(), and focusFirstElement() to focusFirstControl(). [jddalton]
Note: Backwards compatibility warning.
* Cleanup and optimize form/field files and ensure the getValue/setValue methods are consistent across form control elements. [jddalton]
* Add UA sniff to the fuse.env.agent.IE flag to avoid cases where others have added a window.attachEvent method. [Prototype LH #997] [jddalton, PaulC]
* Refactor codebase to use dom attributes/properties correctly and make a clearer distinction between dom attributes and properties. [David Mark, jddalton]
* Add fuse.dom.Element#removeAttribute method. [jddalton, Joe Gornick]
* Optimize fuse.Function methods by removing `arg` variable aliases of the arguments object. [Andrea Giammarchi, jddalton]
* Make fuse.Function.bind() throw a TypeError if `fn` argument is not a function and refactor native bind branch. [jddalton]
* Add a cache flag argument to fuse.dom.Element.create() to allow devs to specify that the dom decorator is not cached. [jddalton]
* Add fuse.dom.Window decorator. [jddalton]
* Stop extending elements with the getFuseId() method and use `uniqueNumber` if available. [jddalton]
* Move fuse.dom.extendByTag() to fuse.dom.Element.extendByTag(). [jddalton]
* Split element.js into modification.js and create.js. [jddalton]
* Remove one closure around fuse.Array extensions. [jddalton]
* Add get() method to fuse.dom.NodeList.plugin and remove fuse.dom.RawList and fuse.rawQuery(), making fuse.query() act like fuse.rawQuery(). [jddalton]
Note: Backwards compatibility warning.
* Ensure native fuse.String#trim works properly and add fuse.env.test('STRING_TRIM_INCOMPLETE'). [FuseJS LH #55] [jddalton, kangax]
* Micro-optimize fuse.Object.keys() and fuse.Object.values() by avoiding results.push(). [Garrett Smith]
* Remove fuse.Enumerable mixins from fuse.Hash. [FuseJS LH #28] [jddalton]
* Update DOM traversal API. [Joe Gornick, jddalton]
Note: Backwards compatibility warning.
- Renamed firstDescendant -> first
- Added/changed API functionality
Returns parentNode/firstElementChild/nextElementSibling/previousElementSibling/lastElementChild
Returns relevant element element matched by specified selector
up/down/next/previous/first/last(callback, thisArg):
Returns first relevant element that callback returns true for
Returns an nth length fuse.dom.NodeList of relevant elements
* Make fuse.dom.Selector namespace lowercase and update selector engine adapters to support an optional `callback` argument. [jddalton]
* Remove `new` operator from Function constructor calls and minify code strings used in compiled methods. [jddalton]
* Simplify extending fuse.dom.NodeList and fuse.dom.RawList and conform more to the jQuery syntax for list getters/setters. [jddalton]
* Force fuse.Object._each() to skip the `prototype` property on functions because browsers are not consistent one way or the other. [jddalton]
* Use the global.opera [[Class]] value for better Opera agent detection. [jddalton, Paul Irish]
* Ensure private function toInteger() works with extremely large negative values. [Asen Bozhilov, jddalton]
* Remove unused functionality from fuse.addNS(). [jddalton]
* Update the fuse.Class API. [jddalton, T.J. Crowder]
- Created fuse.Class.statics and fuse.Class.mixins objects
- Moved the callSuper() method onto the Class.mixins object
- Added addMixins(), addPlugins(), addStatics() methods to fuse.Class.statics object
- fuse.Class argument order is now ($super, plugins, mixins, statics) or (plugins, mixins, statics)
- Class extend() argument order is now (plugins, mixins, statics)
- Call a super method one of the following:
this.callSuper(arguments); // OR
this.callSuper(method, arg1, arg2, ...); // OR
method.$, arg1, arg2, ...); // OR
arguments.callee.$, arg1, arg2, ...);
* Simplify private function toInteger(). [Asen Bozhilov, jddalton]
* Give private function addArrayMethods() a default value of emptyFunction() so that the Array extensions aren't needed for other modules to call it. [jddalton]
* Ensure new fuse.Object() is instanceof fuse.Object. [jddalton]
* Add `instance` argument to fuse.Fusebox() allowing a custom object to be used as the base which sandboxed natives are attached to. [jddalton]
* Ensure fuse.Object.toQueryString() works correctly when objects contain undefined values in IE. [jddalton]
* Rename fuse.env.Bug/Feature to fuse.env.test and add fuse.env.addTest and fuse.env.removeTest methods. [FuseJS LH #44] [jddalton, Joe Gornick, kangax]
* Lowercase the Fuse namespaces and remove the List aliases. [jddalton]
* Add the overlooked reverse(), sort(), and splice() methods to the Fuseboxed Array.prototype. [jddalton]
* Make Fuseboxed constructor's prototype values of the OBJECT__PROTO__ branch conform to ECMA specifications. [jddalton]
* Add sandboxed Boolean constructor to Fusebox. [jddalton]
* Add a lot of comments to Fuse.Fusebox() and cleanup its codebase. [jddalton]
* Break Fuse.Object.prototype's relationship to other sandboxed natives for consistency across sandbox variations. [jddalton]
* Remove extraneous document.domain setter in the ACTIVE_X_OBJECT branch of createSandbox(). [jddalton]
* Simplify accessing the created iframe in createSandbox(). [jddalton]
* Simplify the RegExp wrapper for broken `\s` in createFusebox(). [jddalton]
* Remove `delete this[expando]` from Ajax.Updater, Ajax.TimedUpdater, Range, Template, and Timer classes to avoid issues when `this` is the global object in IE. [jddalton]
* Move the Element#scrollTo method to the position.js. [jddalton]
* Add `selected` to the list of flag attributes in attribute.js. [Diego Perini, jddalton]
* Make Event.extend() work on events originating from a secondary document. [jddalton]
* Convert unit tests with the `!=` selector to `:not()`. [jddalton]
* Update NWMatcher adapter to work with v1.2.1 [jddalton]
* Make Fuse.Dom.Node() not error with textNodes. [jddalton]
* Remove extraneous check from Fuse.Object.isSameOrigin(). [jddalton]
* Fix regression bugs with Element#contains and Element#getViewportOffset that prevented unit tests from passing. [jddalton]
* Update browser.html, interpreter.html, functional event tests, and remaining unit tests to work with dom wrappers. [jddalton]
* Rename Element#descendantOf to Element#contains and flip the functionality. [jddalton, Joe Gornick]
Note: Backwards compatibility warning.
* Ensure isHostObject() avoids a false positive for null values. [jddalton, kangax]
* Rename Element#childElements to getChildren() and add `get` prefix to element methods ancestors(), classNames(), descendants(), siblings(), nextSiblings(), and previousSiblings(). [jddalton, Joe Gornick]
Note: Backwards compatibility warning.
* Rename Element#read/writeAttribute to get/setAttribute(), add `is` prefix to String/Element#empty and `get` prefix to element methods cumulativeOffset(), cumulativeScrollOffset(), positionedOffset(), and viewportOffset(), [jddalton, Joe Gornick]
Note: Backwards compatibility warning.
* Add support for `context` and `callback` arguments to Fuse.Util.$$() and fix failing selector unit tests. [jddalton]
* Make Fuse.Array#concat and Fuse.Array#slice replacements conform to ECMA 5 specification. [Prototype LH #843] [jddalton, Yaffle]
* Optimize Fuse.Dom.Node() handling of window objects. [jddalton]
* Make Fuse.String#stripTags allow tag names to contain hyphens as stated in spec. [jddalton]
* Reduce the complexity of the html check in Fuse.get() and Fuse.Dom.Element.create() and tweak the feature detection in getNodeName(). [jddalton, kangax]
* Ensure IE Fuse.Dom.Element#getStyle converts negative non-px values to px. [jddalton, jakearchibald, kangax]
* Normalize \t \n \r and multiple spaces to \x20 in element className methods. [jddalton]
* Move method definition of Fuse.Util.$, Fuse.get, and Fuse.getById to dom.js and cleanup element.js. [jddalton]
* Switch from using Array#join for string concatenation to using the plus (+) operator for better minification. [jddalton]
* Support updateGenerics() methods on the DOM wrappers. [jddalton]
* Tweak how String#unescapeHTML tokenizes tags. [jddalton]
* Fix regression bug with Fuse.Dom.Node.getFuseId() getting the proper id. [jddalton]
* Add support for passing a callback to Fuse.query(selector, context, callback). [jddalton]
* Add support for passing an attributes object to Fuse.get(tagName, attributes, context). [jddalton]
* Pass the decorator, instead of the element, to Node.getFuseId() because it is resolved faster. [jddalton]
* Make all DOM methods work with a generic `this`. [jddalton]
* Add Fuse.rawQuery, Fuse.Dom.RawList, Fuse.Dom.Element#rawQuery. [jddalton]
* Add DOM methods to Fuse.Dom.NodeList. [jddalton]
* Remove `this instanceof` usage from FuseJS. [jddalton]
* Rename Fuse.Ajax.getTransport to Fuse.Ajax.create and Fuse.Ajax.Request#transport to Fuse.Ajax.Request#raw. [jddalton]
Note: Backwards compatibility warning.
* Make all namespaces inheritable. [jddalton]
Example: Fuse.plugin.addNS = ...; Fuse.Dom.addNS('Data');
* Rename Fuse.Dom.Element#isFragment to Fuse.Dom.Element#isDetached. [jddalton]
* Add nodeType constants DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, and ELEMENT_NODE. [jddalton, kangax]
* Change all `foo.indexOf(blah) === -1` to `foo.indexOf(blah) < 0`. [Andrea Giammarchi, jddalton]
* Rename Fuse.Dom.Element.decorate to Fuse.Dom.Element.fromElement to be consistent with the rest of the API. [jddalton]
* Add Fuse.Dom.Document class and support for Fuse.get(document). [jddalton]
* Move Fuse.String#scan to template.js so it is with other `gsub` centric methods. [jddalton]
* Futher optimize Fuse.String#times by using recursion. [Dr. J.R. Stockton, jddalton, kangax, Yaffle]
* Allow Fuse.String#extractScripts() to accept a callback argument which reduces one iteration in Fuse.String#evalScripts. [jddalton]
* Cleanup string.js and lazy define Fuse.String#escapeHTML and Fuse.String#unescapeHTML. [jddalton]
* Move all DOM functionality to the src/dom directory. [jddalton]
* Optimize Fuse.String#lastIndexOf by removing the use of the arguments object and make Fuse.Array#indexOf and Fuse.Array#lastIndexOf use toInteger(). [jddalton]
* Optimize Fuse.String#times by using the `Exponentiation by squaring` algorithm. [Yaffle]
* Add support for Fuse.get('<div>') and Fuse.Dom.Element('<div>') to return a new decorated element. [jddalton]
* Make Fuse(element) point to Fuse.get(element) when DOM modules are included. [jddalton]
* Make Fuse.Range#max and Fuse.Range#min only require Fuse.Enumerable equivalents when passing a callback. [jddalton]
* Add private `Enumerable` variable to shorten the Fuse.Enumerable lookup. [jddalton]
* Add private `nil` variable to shorten some null assignments. [jddalton, Kyle Simpson]
* Optimize Fuse.Dom.Element methods `insert`, `update`, and `replace` by only evaling scripts or creating nodes when needed. [jddalton]
* Overhaul how Fuse.Dom.Element methods read and write SCRIPT element text. [jddalton]
* Add Fuse.Dom.Node#getFuseId so it can be inherited by all other element/node classes. [jddalton]
* Optimize Fuse.String#startsWith and Fuse.String#endsWith. [Prototype LH #808] [jddalton, Yaffle]
* Cleanup and optimize Fuse.Fusebox() as well as add Firefox 1.5 - compatibility. [jddalton]
* Expose Fuse.getDocument() and Fuse.getWindow(). [jddalton]
* Make Fuse.Dom.Node() pass to Fuse.Dom.Element.decorate() if the nodeType is equal to 1. [jddalton]
* Ensure Fuse.Dom.NodeList methods return Fuse.Dom.NodeList instead of Fuse.Array instances where necessary. [jddalton]
* Update vendor repos and modify the NWMatcher adapter to use variable references for the and NW.Dom.match() methods. [Diego Perini, jddalton]
* Optimize Fuse.Enumerable.eachSlice() by avoiding a call to map() if no callback is provided. [Prototype LH #796] [Joran Greef]
* Rename Fuse.Class.Methods.addMethods to `extend`. [jddalton]
Note: extend() may be invoked in one of the following ways:
- MyClass.extend(plugins)
- MyClass.extend(statics, plugins)
- MyClass.extend(statics, plugins, mixins)
* Convert Element#inspect to Fuse.Dom.Element#inspect. [jddalton]
* Revert Fuse.Enumerable to a mixin and remove it as a dependency for Fuse.Range. [jddalton]
* After further study change `1 * n` back to to `+n` for quick numeric conversions. [Kean Tan]
* Ensure Fuse.RegExp's \s fix is done in a non-capturing group. [jddalton]
* Fix typo in STRING_REPLACE_COERCE_FUNCTION_TO_STRING bug test key. [jddalton, kangax]
* Stop Opera 9.25 Fuse.Array#slice from clipping results when the end index falls on an undefined index. [jddalton]
* Remove support for Fuse.Function#argumentNames. [jddalton]
Note: Backwards compatibility warning.
* Switch to element decorator patterns instead of extending the native dom elements. [FuseJS LH #29] [jddalton]
Note: Backwards compatibility warning.
- Reorganized event.js
- Remove unused functionality from unittest.js
- Convert some unit tests to use the new element decorators
* Add support for inspecting Fuse's Array, Element, Event, Enumerable, Hash, and String plugin properties. [Prototype LH #787] [jddalton, jedediah]
* Add support for the W3C ElementTraversal interface in traversal.js. [jddalton, Diego Perini]
* Ensure Element#getStyle checks isNull() before other calculations. [jddalton]
* Optimize Element className methods by removing support for edge case whitespace such as newlines and tabs. [jddalton, kangax]
* Update the Class API for calling super methods to T.J. Crowder's implementation. [jddalton, kangax, T.J. Crowder]
* unit test: Correct Element#getStyle width/height test in IE6. [jddalton]
* Store RegExp patterns created while executing Element#removeClassName in a cache. [jddalton, Garrett Smith, kangax, YUI Team]
* Move `borderWidth`, `marginWidth`, `paddingWidth`, and height equivalents from Element#getStyle to Element#getDimensions. [jddalton]
* Optimize Element traversal methods `ancestors`, `next`, `nextSiblings`, `previous`, `previousSiblings`, `siblings`, and `up`. [jddalton, joneff, kangax]
* Add support for the MSXML2.XMLHTTP ActiveXObject because Microsoft.XMLHTTP is deprecated. [MooTools LH #739] [jddalton, lukasbuenger, Scott Kyle]
* Change Fuse.Version, Fuse.ScriptFragment and Fuse.JSONFilter to camelCase to be consistent with the rest of the codebase. [jddalton]
* Absorb pseudo private style helper methods into Element#getStyle and cleanup style.js and position.js. [jddalton]
* Add extraneous semicolons to make JSLint happy. [Diego Perini]
* Fix Fuse.Object.isSameOrigin() unit test when running from rake. [Diego Perini, jddalton]
* Implemented Element.getDimensions() options argument. [FuseJS LH #6] [Joe Gornick, jddalton]
* Stop Element#isVisible unit test from failing because IE6 doesn't respect 0px dimensions. [jddalton]
* Fix bugs/typos/unit tests in the Fuse.Ajax classes. [Diego Perini, jddalton]
* Ensure line breaks in the Fuse.Console output display correctly for IE6. [jddalton]
* Cleanup and simplify the Fuse.Console class. [jddalton]
* Minor code cleanup and add missing semicolon to Fuse.Ajax.Responder.register(). [Diego Perini, jddalton]
* Ensure the catch-all of Fuse.Object.hasKey() won't error if the object doesn't have a constructor property. [Garrett Smith, jddalton]
* Rename all occurrences of `.Plugin` to `.plugin`. [jddalton, kangax]
* Rename Fuse.Exception to Fuse.Console and add support Opera and Jaxer consoles. [FuseJS LH #52] [jddalton, Mark Caudill, kangax]
* Remove `strict` flag from the `contains` methods and allow native/sandboxed object instances to match primitive values. [jddalton]
* Remove lingering Fuse.Array#clone dependency from the Fuse.Array#grep addition. [jddalton]
* Fix leaked variable `name` that caused TaskSpeed to error in WebKit based browsers. [Diego Perini]
* Refactor codebase to reduce file dependencies and allow more custom build variations. [jddalton]
* Cleanup codebase and optimize Element class. [jddalton, kangax]
- Optimized Fuse.Util.$
- Optimized insertableNodeTypes
- Optimized Element.addMethods()
- Fixed global var leaks in fusebox.js
- Stoped wrapping `toString` and `valueOf` on sandboxed natives
- Removed SafariMobile browser sniff from Feature('ELEMENT_SPECIFIC_EXTENSIONS')
- Renamed Element._getContentFromAnonymousElement() to Element._getFragmentFromString()
- Made Element.extend.refresh() private
* Rename Fuse.Browser to Fuse.Env to include other environments like Jaxer and Adobe AIR. [FuseJS LH #44] [jddalton, kangax]
* Reduce object property lookups by creating private variables and perform some code cleanup. [jddalton]
* Fix bug in Fuse.Object.isSameOrigin() that allowed urls ending with the same domain name to pass. [jddalton]
* Ensure Fuse.Object.toQueryString() only enumerates over an object's own direct properties. [Prototype LH #126] [jddalton, Kit Goncharov, Peter Gyongyosi]
* unit test: Add option to dynamically set the Fuse.debug flag in the test template. [jddalton]
* Fuse.debug flag set based on query string parameters in script tag [jddalton, Thomas Fuchs, Mark Caudill]
* Namespace Fuse.Exception added to use Firebug or to throw an exception via the Fuse.debug flag. [FuseJS LH #52] [jddalton, Mark Caudill]
* Rethrow errors when `onException` callbacks are not provided for Fuse.Ajax.Request instances. [Prototype LH #634] [jddalton, Spezi]
* unit test: Fix bug in Test.Unit.Testcase#benchmark failing to use Fuse.Number#times. [jddalton]
* Add `timeout` option and `onTimeout` event callbacks to Fuse.Ajax.Request. [FuseJS LH #37] [Prototype LH #220] [jddalton, Laurent Fortin, Mark Caudill]
* Optimize the Element constructor giving it a massive performance boost in all browsers. [FuseJS LH #50] [Diego Perini, jddalton]
* Tweaked a line in the Rakefile to automatically run `rake dist` before running `rake build_unit_tests`. [Kit Goncharov]
* unit test: Change Fuse.Ajax.Request `onComplete` callback to `onDone` in the html template and update Fuse.Dom.Selector tests to reflect the changed doctype. [jddalton]
* unit test: Add Fuse version number to the html templates. [jddalton, Tobie Langel]
* Fix Fuse.Ajax.TimedUpdater#maxDecay and add relevant unit tests. [Prototype LH #419] [Casey Watson, jddalton]
* Catch Firefox error when accessing Fuse.Ajax.Request#status caused by status 408 Request Timeout. [jddalton, Monsur Hossain]
* Count Fuse.Ajax.Request#status 304 as a successful request. [Prototype LH #331] [jddalton, Kenneth Kin Lum]
* Translate IE's incorrect Fuse.Ajax.Request#status 1223 to 204. [FuseJS LH #40] [jQuery Trac #1450 ] [Prototype LH #49, #129] [amartone, jddalton, Ken Snyder, Mark Caudill, Monsur Hossain]
* Only count a Fuse.Ajax.Request#status of 0 as successful for non-http requests. [Prototype LH #49] [jddalton, Mark, Caudill, Radek Pech]
* Allow Fuse.Ajax.Responders.dispatch() to continue dispatching events even though one or more responder has thrown an error. [Dean Edwards, jddalton, John Resig]
* Merge Fuse.Ajax.Response into Fuse.Ajax.Request. [FuseJS LH #41, #43, #49] [jddalton, Mark Caudill]
Note: Backwards compatibility warning.
- Reduce memory use and optimize performance
- Ensure all xhr readyStates are fired
- Ensure headers are available in state 2
- Set response text/JSON/XML to null/empty string when xhr is aborted
- Fuse.Ajax.Base constructor accepts `url` as the first argument and `options` as the second
- Fuse.Ajax.Base normalizes all options
- Users may set the default headers at Fuse.Ajax.Base.options.headers
- Renamed Fuse.Ajax.Request methods `success` to `isSuccess`
- Removed Fuse.Ajax.Request methods `setRequestHeaders`, `evalResponse`, and `getStatus`
- Removed all browser sniffs from Fuse.Ajax
- Removed an old bug fix for Firefox versions lower than 1.5 (it caused bugs with xhr HTTP authentication)
* Add support for passing username and password to allow Ajax HTTP authentication. [FuseJS LH #48] [jQuery Trac #2570, #2865] [Prototype LH #585] [jddalton, kai, Mark Caudill, mikeg]
* Change Fuse.Ajax.Request.Event names to those defined by the W3C XMLHttpRequest draft. [jddalton]
Note: Backwards compatibility warning.
* Ensure onSuccess/onFailure responders are fired regardless of provided request options.onXXX status callbacks. [Prototype LH #263, #334] [Darrin Holst, jddalton]
* Skip global/request onSuccess/onFailure events if the request is aborted. [Diego Perini, fearphage, jddalton]
* Add missing semicolons, reduce multiple variable declarations, and remove wrongly placed commas. [Diego Perini]
* Add Fuse.Ajax.Request#abort method and ensure all XHR readyState events are fired once. [Prototype LH #124, #398, #447, #560] [FuseJS LH #36, #38] [Diego Perini, fearphage, jddalton, Mark Caudill]
* Change to HTML 4.01 Transitional doctype and escape closing tags in the source in the off chance that it is embeded in a page instead of an external js file. [jddalton]
* Make Fuse.String#truncate work with zero and null lengths. [jddalton]
* Optimize Fuse.String#camelize and cleanup Fuse.String#capitalize. [fearphage, jddalton]
* Fix incorrect usage of Fuse.String#unfilterJSON in Fuse.Ajax.Request#evalResponse and optimize Fuse.String#unfilterJSON and Fuse.String#isJSON. [jddalton, Samuel Lebeau]
* Fix IE6 try-catch-finally bug in Fuse.Timer class and unit tests. [Prototype LH #696] [jddalton, xucia, Yaffle]
* Changed the argument order in Form.TimedObserver and Field.TimedObserver to `element, callback, interval, options` for a more consistent API. [jddalton]
Note: Backwards compatibility warning.
* Make Fuse.Timer() operate on milliseconds instead of seconds and allow setting the millisecond `multiplier` via an options object as the third argument. [FuseJS LH #26] [Kit Goncharov, jddalton, Joe Gornick]
Note: Backwards compatibility warning.
* unit test: Fix minor Safari 2.x bugs in functional event tests. [jddalton]
* Rename Fuse.Ajax.Base and Fuse.Ajax.TimedUpdater `defaultOptions` object to `options` and fix options related bugs in Fuse.Ajax.TimedUpdater. [jddalton, Joe Gornick, Kit Goncharov]
Note: Backwards compatibility warning.
* Add Ext.DomQuery support and allow the active css engine to be dynamically set in the unit tests. [jddalton]
* Ensure that Fuse.Object() converts native objects as well as primitives to Fuseboxed natives. [jddalton]
* Ensure `max` and `min` methods of Fuse.List and Fuse.Enumerable don't return augmented values when using callbacks. [jddalton]
* Optimize Fuse.Range `max`, `min`, 'size', and `toArray` methods. [Prototype LH #117] [jddalton, Michael M Slusarz]
* Stop escaping quotes in Fuse.String#escapeHTML and stop stripping tags in Fuse.String#unescapeHTML. [Prototype LH #722, #729] [jddalton, mck, SWilk, T.J. Crowder, Tobie Langel]
* Fix IE bug where Fuse.String#match(pattern) incorrectly sets the pattern's `lastIndex` property. [jddalton]
* Optimize Fuse.String#lastIndexOf and fix a Chrome bug where negative positions aren't set to 0. [jddalton]
* Optimize property lookup speeds by storing references to longer namespaced objects and simplifying method aliases. [jddalton]
* Make Fusebox fallback on Fuse._docEl instead of document HEAD when inserting an iframe. [fearphage, jddalton]
* Ensure IE8 EMBED elements are extended manually and APPLET/EMBED/OBJECT elements are extended by Element.Simulated methods. [Prototype LH #681] [jddalton, kangax, Nick Stakenburg]
* Avoid an alert in IE8 when testing for ELEMENT_OBJECT_AND_RELATIVES_FAILS_TO_INHERIT_FROM_PROTOTYPE and Java is not installed. [Prototype LH #668] [Andrew Dupont, jddalton, kangax, orv]
* Wrap variable assignments in return statements with parentheses to ensure Chrome 1 support. [jddalton]
* Ensure Fuse.Function, when used as a constructor, makes the default value of `this` equal to the document global and change the `thisArg` assigned by wrappers in Fuse.Fusebox and Fuse.Function. [jddalton]
* Optimize Fuse.String#camelize by using while-loops instead of String#replace. [jddalton, kangax]
* Optimize Element.hasAttribute() by forking if Element#hasAttribute exists. [jddalton, kangax]
* Memoize heavily used Fuse.String methods `capitalize` and `camelize`. [jddalton, kangax]
* Make the Fuse.Class wrapper used for this._super only perform when no arguments are passed. [jddalton]
* Remove the dollar sign method from the global namespace. [jddalton]
* Ensure Event cache is cleared when there are no event handlers and fix a typo in _winLoadWrapper(). [jddalton]
* Make the dom-loaded solution rely on cross-browser rules[n].selectorText instead of rules[n].cssText. [jddalton]
* Avoid an edge-case massive delay in the dom-loaded solution by using global.frameElement instead of [jQuery Trac #4787] [jddalton, Rich Dougherty]
* Make Fuse.Number methods follow spec and work with a generic `this` as well as optimize the math methods. [jddalton]
* Rename Fuse.String#dasherize to `hyphenate`, variables used in String methods from `hash` to `object`, and Fuse.Class private `_emptyFunction` to `_subclass`. [jddalton, kangax, Valerio Proietti]
Note: Backwards compatibility warning.
* Optimize Hash objects by adding a Fuse.Hash#_data property and correct the Fuse.Hash#_object property. [jddalton]
* Use 1 * foo to more quickly coerce data to numbers instead of +foo. [kangax]
* Change Array method internals from Fuse.Object -> Object usage and throw a TypeError if `this` is null/undefined. [jddalton]
* Ensure the `object` argument of Fuse.Object.hasKey() is coerced to an object in all forks of the method. [jddalton]
* Ensure LINK elements collected in the dom-loaded solution have a `rel` attribute of `stylesheet` (case-insensitive). [jddalton, Simo Kinnunen]
* Allow Element#insert, Element#setStyle, Element#writeAttribute, Fuse.Ajax.Request#setRequestHeaders, and Fuse.Ajax.Responders#register to accept a Fuse.Hash object. [Prototype LH #718] [jddalton, Matthew Guscott]
* Pass global instead of null to Function#call and Function#apply. [jddalton]
* Remove respondToReadyState() from the dom-loaded solution, tweak the `doScroll` approach, and ensure `readyState` and `doScroll` approaches continue until one succeeds. [Hedger Wang, jddalton, Thomas Aylott]
* Make Fuse.Array.Plugin methods use bitwise shift operators >>> and >> instead of parseInt(). [Ben Laurie, jddalton]
* Ensure String primatives are passed to eval(). [jddalton]
* Optmized Fuse.Number#toPaddedString by avoiding costly method calls. [jddalton]
* Ensure String#lastIndexOf returns Fuse.Number() values and make string methods conform to spec by cohercing `this` to a string and throwing if `this` is null/undefined. [jddalton]
* Optimize Fuse.String#trim. [jQuery Trac #2279] [Ariel Flesler, DarkRyder, jddalton, phpmyforum, Steven Levithan]
* Make Fuseboxed RegExp constructor automatically fix buggy "\s" character matches in regexp patterns. [jddalton]
* Fix Chrome issue with iframe sandboxes by using the __proto__ mode by default. [jddalton]
* Fixed Konqueror Element#replace bug in _createContextualFragment() that threw errors when passed incompatible markup. [jddalton, kangax]
* Allow objects to execute their own `clone` method when passed to Fuse.Object.clone(). [jddalton]
* Make the Fuse.List methods intentionally generic so they don't require that their `this` value be an Array object. [jddalton]
* unit test: Correct a return statement in the DOM unit test `setup` method. [Ihab Awad, Tobie Langel]
* Optimize Element#isFragment to use Element#compareDocumentPosition if available. [Diego Perini, jddalton]
* unit test: Add tests for table elements to the Element#isVisible unit tests. [jddalton]
* Optimize Element._getContentFromAnonymousElement() by replacing a Fuse.Number#times call with a while-loop. [jddalton, kangax]
* Optimize NWMatcher by passing a Fuse.List to its select() method and update other engines. [Diego Perini, jddalton]
* Ensure pollers used in the dom-loaded solution stop polling when not needed and stop the IE doScroll poller when doScroll() is successful or document readyState is `complete`. [Diego Perini, jddalton]
* Make Element#isVisible() return true when an element has height or width and is not display="none". [jQuery Trac #4512] [Brandon Aaron, jddalton, qiuzj, vbabiy86]
* Allow Fuse.Function methods to pass an array, ['methodName', context], as the `fn` argument to help methods work with lazy loaded methods. [jddalton]
* Ensure Fuse.Object.inspect() avoids treating DOM nodes as generic Object objects. [jddalton]
* unit test: Fix Ajax reference in the emulated DOMParser object. [jddalton]
* Make Fuse.RegExp() calls as a function instead of with a new expression. [jddalton]
* Escape a forward slash in the regexp pattern of Fuse.Object.isSameOrigin(). [Diego Perini, jddalton]
* Optimize Fuse.String#replace and ensure it follows specification with regard to setting the pattern.lastIndex. [jddalton, Samuel Lebeau]
* Remove unneeded IE8 RC1 fork in Fuse.List.fromNodeList(). [Diego Perini]
* Optimize Fuse.Template by converting the pattern once during instanciation. [jddalton, Samuel Lebeau]
* Make Fuse.String#stripTags more closely follow the W3C specification. [Prototype LH #674] [igor, jddalton, kangax]
* Add Fuse.String#lastIndexOf if missing from the sandboxed String. [jddalton]
* Allow Fusebox to remove the iframes used to create the native sandboxes in Opera 9.5-10a. [jddalton]
* Add support for Peppy and Dojo Acme JavaScript CSS Selector engines and update other engines. [jddalton]
* Correct many coding issues related to the unit test rewrites. [jddalton]
Note: Backwards compatibility warning.
- Reduce repeated code by creating/removing aliases:
* Ajax.Response#getAllHeaders -> Ajax.Response#getAllResponseHeaders
* Ajax.Response#getResponseHeader -> Ajax.Response#getHeader
* Fuse.Util.$$() -> Fuse.query()
* Remove Fuse.RegExp#match alias of Fuse.RegExp#test
- New Fixes/Optimizations
* Make Fuse.Class, Fuse.Range and others perform as if by a new expression when they, the constructors, are called as a function.
* Ensure, for IE, that Element#writeAttribute coerces values to strings before setting them. [kangax]
* Make more methods return extended natives
* Address Element#clonePosition issue with hidden elements in Safari 2.x (needs refining)
* Optimize Element#getOpacity by avoiding calls to Element#getStyle
* Add Fusebox Array.create() and Array.fromArray() methods
* Ensure NWMatcher, Sizzle, Slick, and Sly engines will run against selector unit tests
* Make Fusebox String() returns an empty string when called with no argument given
* Ensure Fusebox Array#filter, Array#every, Array#map, and Array#some are only wrapped once
* Correct behavior of Fusebox Object when called as a function
* Reduce code needed for "__proto__" support in Fuse.Fusebox._createNatives()
* Make Fuse.Fusebox(mode) accept a mode argument to allow devs to choose the method in which a sandbox is created
* Create the Field.EventObserver, Form.EventObserver, Field.TimedObserver, and Form.TimedObserver constructors using named functions for better debugging
* Make Fuse.Fusebox#updateGenerics use Fuse.Object._each() when available
* Ensure IF statements and others checking for empty strings will work with those created by Fuse.String()
* Make getStyle() dom-load helper fallback on when needed
* Make Fuse.Object.inspect() work with Fusebox Object objects
* Add Fuse.Hash#toArray() to take advantage of the Hash rewrite
* Make Array.Plugin methods inspect, map, without, and zip work with a generic `this` value
* Make Enumerable#zip, Hash#zip work with a generic `this` value
- Regression Bug Fixes:
* Change getWindow(), getNodeName(), Fusebox and JSON methods coding pattern to work in Safari 2
* Ensure Fuse.List.from() works correctly for non array objects
* Fix Fuse.Function.defer() and Fuse.Function.curry()
* Make Fuse.Class() work in Safari 2.x
* Make Fuse.RegExp.specialChar.s work in Safari 2.x
* unit test: Rewrite all unit tests to support the Fuse namespace changes. [jddalton]
* Fix Fuse.Date instanceof detection and make Fuse.Object conform to ECMA specification when passing a null or undefined value. [jddalton]
* Remove strict equality operators when checking indexOf() results because they fail on Fuse.Number instances and correct more overlooked native to Fuse.<native> conversions. [jddalton]
* Optimize Fuse.Function statics and add a method name cache to Fuse.Fusebox#updateGenerics. [jddalton]
* Refactor Fuse.Fusebox() and add the ACTIVE_X_OBJECT feature test. [jddalton]
* Fix a regression bug in Fuse.Class that stopped access to a class's `_super` method. [jddalton]
* Ensure adapters return extended elements in IE. [jddalton]
* Ensure Array#_each returns the array it iterates over and correct overlooked native to Fuse.<native> conversions in the source. [jddalton]
* Append iframes, used when creating a Fusebox, to the HEAD instead of the HTML element. [jddalton]
* Remove nodeListSlice() and add `results` argument to prependList() allowing it to set the results initial value. [jddalton]
* Add Fuse.List.fromNodeList() and Fuse.List.fromArray() as a more granular option to Fuse.List.from(). [jddalton]
* Hook up Fuse.Dom.Selector API and cleanup/optimize more of the element traversal methods. [Prototype LH #349] [dave mankoff, jddalton]
Note: Backwards compatibility warning.
- Add Fuse.query() method
- Remove methods: adjacent
- Allow ancestors, childElements, descendants, nextSiblings, previousSiblings, and siblings methods to filter by selector
* Drop Prototype selector engine and add support for NWMatcher, Sizzle, Slick, and Sly selector engines. [jddalton]
Note: Backwards compatibility warning.
* Ensure Fuse.Util.$A converts primatives into objects when used with the `in` operator. [Justin Perkins, kangax]
* Cleanup and optimize element traversal methods. [jddalton]
Note: Backwards compatibility warning.
- Removed methods: immediateDescendants, getElementsBySelector, recursivelyCollect
- Renamed method: select -> query
- Optimized Element#sibilings() method by reducing the number of function calls it makes
* Correct nodeListSlice() handling of an undefined endIndex. [jddalton]
* Move Enumerable methods to it's prototype. [jddalton]
* Make Fuse natives inherit from Fuse object. [jddalton]
* Cleanup Fuse.Fusebox() and add support for Native generics. [jddalton]
* Move all JSON methods to json.js. [jddalton]
* Cleanup object.js and array.js and add `toList` alias for `toArray` methods. [jddalton]
* Namespace natives Fuse.Date, Fuse.Function, Fuse.List, Fuse.Number, Fuse.RegExp and Fuse.String. [jddalton]
Note: Backwards compatibility warning.
- Moved abstract.js, deprecated.js, try.js to the Prototype emulator folder
- Moved Fuse.Browser object definition to broswer.js
- Renamed Ajax.PeriodicalUpdater to Ajax.TimedUpdate
- Cleaned-up private utility methods
- Ensure consistent use of named functions
- Implemented inheritable namespaces
- Change Fuse.Class()
* Removed Class.create() in favor of Fuse.Class(superclass/methods [, methods, ...])
* Allow passing a `constructor` method to Fuse.Class to use as the klass()
* Make the initialize() method optional and don't create it by default
- Added methods:
Fuse.addNS(path, superclass/methods [, methods, ...]): Add namespaces to the Fuse object
Fuse.Fusebox(): Return an object containing sandboxed natives
* unit test: Add Form unit tests to ensure Fuse works with Safari's input type="search". [jddalton, malsup]
Originally reported on
* Make Ajax.Request() use the window.location.href value if a falsy url is given. [Prototype LH #597] [jddalton, Spezi]
* Ensure IE String#replace converts null/undefined return values to string `null`/`undefined` and add more unit tests for String#replace, String#gsub, and String#sub. [jddalton, Michael Hollauf, Samuel Lebeau]
* Add Hash#toArray and properties _prairs, _keys, and _values to optimize methods iterating over the internal hash object. [jddalton]
* Add support for Mozilla's Object#__count__ property in Object.isEmpty(). [Andreas Ecker, jddalton, Nicholas Zakas]
* Optimize Number#times by forking for `thisArg` and cleanup Try.these() and ObjectRange#_each. [jddalton]
* Optimize Array#contains and Enumerable.contains() by forking for strict or loose matches. [jddalton]
* Give Object.inspect() the ability to process Object objects. [Prototype LH #638] [Evil.2000, jddalton]
* Hash API updates and optimizations. [FuseJS LH #17] [jddalton, Joe Gornick]
Note: Backwards compatibility warning.
- Renamed methods: include -> contains
- Removed methods: reject, update
- Removed aliases: findAll, index, select, toTemplateReplacements
- Updated methods:
Hash#contains: Added a strict parameter for strict comparisons.
Hash#set: Updated to accept either key/value arguments or an object/Hash.
Hash#unset: Updated to accept either an array of keys or arguments of keys.
- Added methods:
Hash#first: Added proper `first` support to Hash.
* first(n): Returns an array containing the first n of the list.
* first(callback, [thisArg]): Returns the first item when the callback returns true.
Hash#last: Added proper `last` support to Hash. Same as Hash#first, but starts from end.
Hash#map: Added proper `map` support to Hash.
* Ensure Fuse determines the correct element to get page scroll data from. [jddalton]
* Fix Chrome's broken String#replace that returns the wrong results for global empty pattern matches with functions as replacements. [jddalton]
* Optimize String#toQueryParams by avoiding String#match and Array#shift. [jddalton]
* Optimize Enumerable.first() when passing no arguments. [jddalton]
* Fix Array#inject recursion error in Firefox. [jddalton]
* Cleanup Feature/Bug tests and correct Element#clonePosition unit test for IE 6. [jddalton]
* Rename Element#visible to Element#isVisible. [jddalton]
Note: Backwards compatibility warning.
* Make Element#visible work with elements that are nested in hidden parent elements or have an offsetWidth/offsetHeight of zero. [jddalton, matheusalmeida]
Originally reported on
* Make $() fallback on the `expando` varaible for malformed strings to avoid passing an empty string to document.getElementById(). [Rails Trac #11568] [gryn, jddalton]
* Rename String#strip to String#trim and add JavaScript 1.8.1 String#trimLeft and String#trimRight support. [jddalton]
Note: Backwards compatibility warning.
* Rename Element#absolutize to Element#makeAbsolute and Element#relativize to Element#undoAbsolute. [jddalton]
Note: Backwards compatibility warning.
* Ensure Element#cumulativeOffset works with hidden elements or elements with borders and Element#clonePosition resizes elements, with various paddings, correctly. [Prototype LH #603] [jddalton, Manuel Carrasco]
* Make Element#clonePosition work correctly when `source` is an ancestor of `element`. [jddalton]
- Add Element._getBorderWidth(), Element._getBorderHeight(), Element._getPaddingWidth(), and Element._getPaddingHeight()
- Element#cummulativeOffset allow a second `ancestor` argument to be used to stop iterating when it encounters the ancestor
- Make Fuse.Browser.Bug() and Fuse.Browser.Feature() expose their internal cache object as `_object`
* Ensure Element#getOffsetParent returns the proper offsetParent for hidden elements. [Prototype LH #618] [jddalton, rvagg]
* Allow Element#getOffsetParent to return null and remove Element._getRealOffsetParent() helper. [jddalton]
Note: Backwards compatibility warning.
* Move Element#getStyle and Element#setStyle to the same closure so they can share constants as well as cleanup Element#setOpacity and Element#getStyle. [jddalton]
* Remove unneeded `decodeURIComponent(escape(json))` from Ajax.Response#_getHeaderJSON and rely on proper encoding instead. [Prototype LH #620] [FuseJS LH #27] [jddalton, Mark Caudill, Paul Alexandrow]
* Ensure strict arguments.length comparisons, cleanup Array#inject, and remove arguments.length based forking in Array#first and Array#last. [jddalton]
* Updated Array, Enumerable, and String APIs. [FuseJS LH #16] [jddalton, Joe Gornick]
Note: Backwards compatibility warning.
- Renamed methods: include -> contains
- Removed methods: detect, reject
- Removed aliases: all, any, collect, entries, find, findAll, member, select
- Updated methods:
Enumerable.contains: Added a strict parameter for strict comparisons.
- Added methods:
Enumerable.first: Replaces the need for `detect` and accepts optional parameters.
* first(n): Returns an array containing the first n of the list.
* first(callback, [thisArg]): Returns the first item when the callback returns true.
Enumerable.last: Same as Enumerable.first, but starts from the end.
* Fix Safari 3.0.4 bug in Element#update when updating COLGROUP and OPTGROUP elements as well as cleanup the Safari 2 insertion wrapper for script elements. [jddalton]
* Ensure exceptions thrown in the Timer's callback are not swallowed by the try-catch in onTimerEvent(). [jddalton]
* Add Object.isEmpty() utility method to help detect when an object contains no properties of its own. [Prototype LH #245] [jddalton, Ken Snyder]
* Cleanup String#escapeHTML and String#unescapeHTML as well as standardize capability check property values to reduce extraneous text. [jddalton]
* Fix IE bug where String#replace sets regexp's lastIndex property. [jddalton]
* Optimize Hash using the `expando` property to avoid costly Object.hasKey() lookups. [jddalton, kangax]
* Add unique private `expando` property. [jddalton]
* Fix regression bug in the Object._each() Safari 2 fork. [jddalton]
* Ensure Object.isHash() returns false for Hash.prototype. [jddalton]
* unit test: Update unit test framework. [jddalton, Tobie Langel]
* deprecation extension: Mark Array#reduce() as removed (commented out because native Array#reduce is used in Array#inject). [jddalton, Tobie Langel]
* deprecation extension: Modify so it will run in Fuse. [jddalton]
* deprecation extension: Cleanup Hash update helpers. [Tobie Langel]
* deprecation extension: Cleanup `assertInfoNotified`, `assertErrorNotified`, `assertWarnNotified`, and `assertNotNotified` tests, as well as add `assertEmpty` test. [Tobie Langel]
* Add support for script elements in Element#update, Element#insert, and Element#replace. [Prototype LH #573] [jddalton, kangax, Martin, Tobie Langel]
* Work around IE8 bug causing APPLET and OBJECT elements not to inherit from their prototypes. [jddalton]
* Fix Safari 2 bugs in getWindow() and Event.extend() as well as comment Element.extend(). [jddalton]
* Fix coding pattern so function expressions will work in Safari 2. [jddalton]
* Remove undeclared assignments for ECMA 3.1 strict mode compliance. [jddalton, kangax]
* Change coding pattern to utilize named function expressions and reduce FuseJS's memory footprint. [jddalton, kangax]
* Make Element#viewportOffset work with elements in iframes, ensure `rootNodeName` is a declared locally in Element#cumulativeScrollOffset, and cleanup document.viewport.getScrollOffsets(). [jddalton]
* Fix bug in Element#getOffsetParent caused when returning a null element and ensure AREA elements return their parent MAP element. [Diego Perini, jddalton]
* Rename the `global` variable in String#replace to `isGlobal` as to not be confused with the environment's `global` object. [jddalton]
* Optimize private method concatList() by no longer cloning the list being concatenated. [jddalton, Robert Kieffer]
* Optimize Element#hasClassName. [Diego Perini]
* Remove extraneous Safari 2 fork of the $A() utility method. [Prototype LH #595] [jddalton, kangax]
* Fix incorrect method references in the DOM Level 0 event system. [jddalton]
* Add private methods getWindow() and getRoot() to ensure the Event system works across frames. [jddalton]
* Fix how Event#pointer methods lazily define themselves as well as a bug in IE Event#pointer methods . [jddalton]
* Fixed Opera 9.2x bug in nodeListSlice() when converting node lists containing an element with an id="length". [Diego Perini, jddalton]
* Add Opera support to the ELEMENT_SPECIFIC_EXTENSIONS feature detection. [jddalton]
* Add missing semicolon to String#toQueryParams and make Selector methods more Caja friendly. [jddalton]
* Large cleanup of code in preparation for the namespace rewrite. [jddalton]
- Add private method getNodeName() [David Mark, kangax]
- Rename private method getOwnerDoc() to getDocument()
- Move private variables body, doc, docEl, dummy, and root to the Fuse object as Fuse._body, Fuse._doc, Fuse._docEl, Fuse._div, Fuse._root
- Remove window onunload event handlers to enable bfcache
- Fix IE memory leak in the Event object
- Indicate methods are private by prefixing their name with an underscore
- Optimize the RegExp.specialChar.s fix
- Cleanup Try object
- Ensure elements are cached propertly, in IE, when created with a name/type attribute
* unit test: Fix DOM test `testElementUpdateWithToElementMethod` check for html comments in Safari 2 and change the wording on some Event test error messages. [jddalton]
* Add Object._extend() as a stripped down version of Object.extend() without any `DontEnum` fixes. [jddalton]
* Ensure Template#evaluate does not evaluate inherited properties of the `object`. [jddalton, kangax]
* Avoid unneeded extending/iterating in Element#down, Element#next, Element#previous and Element#up. [Prototype LH #452] [eno, jddalton]
* Reorganize String.prototype extensions. [jddalton]
* Optimize String#camelize, String#gsub, String#inspect, String#sub and Template#evaluate by using String#replace. [jddalton, kangax]
* unit test: Comment-out benchmarks in the String unit tests. [jddalton]
* Add RegExp#clone to allow easy regexp cloning and changing of pattern flags. [jddalton]
* Ensure correct behavior of String#replace, in Safari 2, when passing a function as the `replacement` argument. [Prototype LH #534] [Dean Edwards, jddalon, kangax, Samuel Lebeau]
* Allow Element#insert, Element#update, and Element#replace to insert comment, document fragment, document type, and text nodes. [jddalton]
* Fix Element#update error on `buggy elements` when appending an element created by `toElement`. [jddalton]
* Optimize Array#inject to use Array#reduce if available. [jddalton, kangax]
* Fix bug in Array#concat substitution that caused it to exit early for falsy values. [jddalton]
* Optimize Class.create() and Class#addMethods and switch to using `this._super()`. [Joey Hurst, jddalton, John Resig]
Note: Backwards compatibility warning.
- The $super variable is no longer used to access a super's method.
Intead use `this._super()` in the body of the subclassed method.
* Rename Object.isOwnProperty() to Object.hasKey() and add Hash#hasKey. [apm, jddalton]
* Remove internal use of the $super variable in Fuse. [jddalton]
* Allow Element.addMethods() and Event.addMethods() to add `toString` and other special methods. [jddalton]
Note: Additions to HTMLElement.prototype will be ignored if HTML<tagName>Element.prototype has an existing
property with the same name. Extending elements by tagName will get around the issue.
* Ensure correct use of the delete operator. [jddalton]
* Allow IE8 to utilize the Element and Event prototype objects. [Andrew Dupont, jddalton]
* Add Event.addMethods() to allow adding methods to Event instances. [Prototype LH #203] [jddalton, Ken Snyder]
* Cleanup Fuse.Browser.Feature and Fuse.Browser.Bug and rename the Tester `add` and `remove` methods to `set` and `unset`. [jddalton]
* Fix private method nodeListSlice() causing Safari 2 to enter an infinite loop. [jddalton]
* Ensure Object.keys() and Object.values() accept function objects. [jddalton, kangax]
* Add `prototype` to the list of properties to iterate over in the IE fork of Object._each(). [jddalton]
* Add Object.isPrimitive(). [kangax]
* Simplify Element#readAttribute and Element#writeAttribute by using element.getAttributeNode() as the default method of reading attributes. [Diego Perini, jddalton]
Note: Backwards compatibility warning.
- Renamed Element._attributeTranslations to Element.Attribute
- Element.Attribute methods `_setAttrNode`, `_flag`, `_getAttr`, `_getAttrNode`, and `_getEv` are private and renamed
* Ensure Class.create(), in Safari 3.1+, works with objects containing regular expressions as properties. [jddalton, kangax]
* Ensure Object.isFunction() returns false for regular expressions. [kangax]
* unit test: Cleanup functional event tests by ensuring variables are locally scoped. [jddalton]
* Add IE support for the event.currentTarget property. [Prototype LH #519] [Daniel Varga, jddalton]
* Ensure the `target` property on events is never undefined in IE. [Prototype LH #383] [Mathias Karst�dt, Diego Perini, Andrew Dupont]
Note: This update exposes a bug in Gecko/WebKit browsers where event.currentTarget/ are incorrect for window `onload` and document `dom:loaded` events.
* Fix Opera bug in Object.isOwnProperty() when checking properties of the `window` object. [Garrett Smith]
* Fixed critical IE8 bugs that prevented Fuse from loading. [jddalton]
- The nodeListSlice() should no longer cause a range error
- Account for element.currentStyle.hasLayout property permanently set to false
- Avoid iterating over Element.toString()
- Avoid replacing Event.prototype with itself
* Make Array#filter, Enumerable#filter, Hash#filter remove null/undefined values if no callback is provided. [jddalton]
* Rename "context" parameters to "thisArg" and "iterator" parameters to "callback". [FuseJS LH #21, #23] [jddalton, Joe Gornick]
* Ensure all Array, Enumerable, Hash, and ObjectRange methods, that allow a callback, pass the object they are acting on as its third argument. [jddalton]
Note: Backwards compatibility warning.
- The "_each" method is required to pass the second and third arguments to the callback.
* Optimize Array#forEach, Array#inject, Array#map, Enumerable#map by only using "call" when a "thisArg" is given. [jddalton]
* Fixed ObjectRange bug that caused it to exit the cached loop early when it encountered a 0 value. [jddalton]
* unit test: Ensure Enumerable tests against Enumerable methods and not Array methods. [jddalton]
* Make Array#each/Enumerable#each pass the object it's acting on as the third argument of the callback. [kangax]
* Remove Array#each alais of Array#forEach to avoid potential use of forEach's "thisArg" parameter. [Prototype LH #554] [jddalton, kangax, Yaffle]
* Cleanup unit test fixtures and source files. [jddalton]
* Add Object._each() and Object.each() to correctly handle for-in loops. [Rails Trac #11584] [jddalton, kangax, Tobie Langel]
* Make Object.keys() and Object.values() conform to the ECMA 3.1 draft. [jddalton]
* Add Object.isOwnProperty() to aid in detecting "own" vs. "inherited" properties. [Rails Trac #9700, #11043] [Prototype LH #243] [FuseJS LH #8] [arandes, Ben, grey, jddalton]
* Remove the "&_=" Safari 2 ajax bug workaround for the http PUT method. [Rails Trac #2258] [Prototype LH #327] [jddalton, Mark van Eijk, Shane Vitarana]
Fixed in Rails by changeset
* Stop Element#show clearing display values when called before Element#hide. [Prototype LH #177] [jddalton, quamis]
* Stop Element#getHeight/Element#getWidth from setting an element's position to "absolute" because it causes shrink-wrapping. [Prototype LH #313] [datamagi, jddalton]
* Remove uneeded $R() and $H() calls so ObjectRange and Hash can be optional. [FuseJS LH #14] [jddalton]
* Change to initial Fuse namespace. [FuseJS LH #1] [jddalton]
Note: Backwards compatibility warning.
- Exposed Fuse.Browser.Bug() and Fuse.Browser.Feature()
- Moved browser user agent sniffs to Fuse.Browser.Agent
- Removed Fuse.BrowserFeatures
* Rename internal method "mergeList" to "concatList" to better express its functionality. [jddalton]
* Updates to Array API [FuseJS LH #15] [Prototype LH #356] [jddalton, Joe Gornick, quamis]
Note: Backwards compatibility warning.
- Added Array#insert method
- Renamed methods: include -> contains, uniq -> unique
- Removed methods: detect, reject, reverse
- Removed aliases: all, any, collect, entries, find, findAll, member, select
- Updated methods:
Array#contains: Added a strict paramter for strict only comparisons.
Array#first: Add optional parameters to accept a number/iterator.
* first(n): Returns an array containing the first n of the list.
* first(iterator, [context]): Returns first item when iterator returns true.
Array#last: Add optional parameters to accept a number/iterator.
* last(n): Returns an array containing the last n of the list.
* last(iterator, [context]): Returns last item when iterator returns true.
* unit test: Allow IE7+ to test "fixed" positioned elements and test String#endsWith with an empty/non-string pattern argument. [jddalton]
* Allow Object.isSameOrigin() to return true if the url ends with the document.domain which could be a suffix of the current domain. [Prototype LH #67] [jddalton, Mark Caudill, Per Melin]
* Make Object.isSameOrigin() allow urls containing default ports for http, https, and ftp protocols. [Prototype LH #301] [jddalton, Johan Gorter, Mark Caudill]
* Make Object.isSameOrigin() typecast the url as a string. [Prototype LH #251] [jddalton, mazengh]
* Move Ajax.Request#isSameOrigin to Object.isSameOrigin() so the dom:loaded event check may make use of it. [jddalton]
Note: Backwards compatibility warning.
* Make Array#grep and Enumerable#grep exit early if the regexp pattern is empty. [jddalton]
* Optimize Hash methods by replacing calls to "each" with for-in loops as well as change Hash aliases. [Rails Trac #3592] [Prototype LH #539] [aljoscha, Brad Avogel, jddalton, Romain Dorgueil]
Note: Backwards compatibility warning.
- Hash#index is alias of Hash#keyOf
- Hash#keyOf returns -1 if no match is found
- Hash#include searches for the first matching hash value
- Hash#filter, Hash#grep, Hash#reject, and Hash#zip return hashes
- Hash#partition returns an array containing two hashes.
* Make String#(gsub|sub) auto remove the "global" flag from regexp patterns. [jddalton]
* Add Object.isRegExp() data type detection method. [jddalton]
* Ensure String#gsub returns the correct result when passed uncommon patterns. [jddalton, Samuel Lebeau]
* Array optimizations. [jddalton, Joe Gornick, John Resig]
- Array#compact - Removed use of Array#select and added an option to remove "falsy" values
- Array#flatten - Removed use of Array#inject
- Array#include - Only use Array#indexOf
- Array#indexOf - Renamed parameter from i to fromIndex
- Array#inject - Renamed parameter memo to accumulator
- Array#map - If iterator isn't specified return cloned array
- Array#max|min - Use Math.max|min for non-sparse arrays when no iterator is given
- Array#toJSON - Removed use of Array#_each
- Array#uniq - Remove use of Array#inject and parameter sorted
- Array#without - Removed use of Array#select
- Array#intersect - Removed use of Array#_each and renamed parameter other to array
- Array#lastIndexOf - Renamed param i to fromIndex
* Remove unused feature test "ARGUMENTS_INSTANCEOF_ARRAY". [jddalton]
* Optimize ObjectRange by caching its range values on the first use of "_each". [jddalton]
* Optimize Enumerable methods by replacing calls to "each" with "_each" and change aliases to mimic ones set by the Array extensions. [jddalton]
* unit test: Enusre String#sub does not freeze when passed an empty pattern. [jddalton]
* Add support for control groups to Form.Element.EventObserver() and cleanup Form.Element.Observer(). [jddalton]
* Fix Bug('ARRAY_CONCAT_ARGUMENTS_BUGGY') detection and ensure Array#concat's replacement returns an array. [jddalton]
* Optimize Element#getOffsetParent by using the regexp case-insensitive flag instead of tagName.toLowerCase(). [jddalton]
* unit test: Add test to ensure Element#getOffsetParent doesn't raise an exception when called from the children of a document fragment. [jddalton]
* Simplify String#extractScripts and add a unit test to ensure empty scripts are not returned. [jddalton]
* Optimize Form/Field methods by replacing complex method calls with simple while-loops. [jddalton]
* Cleanup String#unescapeHTML and String#extractScripts' HTML comment matching regular expression. [jddalton]
* Cleanup [Andrew Dupont, jddalton]
* Renamed the PeriodicalExecuter class to Timer. [jddalton, Joe Gornick]
- Changed "currentlyExecuting" property to "executing"
- Changed "timer" property to "timerID"
- Remove registerCallback method
- Make onTimerEvent private
- Remove auto-start on instance initialization.
* Cleanup and optimize the event system. [jddalton]
- Reduce event cache complexity
- Take more advantage of lazy defined methods
- Add support for DOM Level 0 event management
- Remove browser sniffs in mouse button detection
- Auto clear window:load and dom:loaded event cache
- Minor cleanup to the functional event.html
* Avoid IE bug effecting hidden elements. [jddalton]
Note: Accessing a hidden element's client/offset<dimension> properties before appending cssText will make the client/offset<dimension> values unchanged by the new style.
* Make Class constructors return the "initialize" method's return value. [Rails Trac #11481] [cch1]
* Make Event's private method isCssLoaded() fail when the "sheet" object of an element is null or undefined. [jddalton]
* Change the way Element.extend() detects XML nodes by testing for the existence of element.ownerDocument.body. [Diego Perini, jddalton]
* Minimize IE6 memory leak caused by Element.extend() and private variables "body", "docEl", and "root". [jddalton]
* Make Form.focusFirstElement() focus the first element instead of activating it. [Prototype LH #473] [jddalton, Robert Sosinski]
* Ensure Field.focus() doesn't throw an error when the element or its ancestors are not visible. [Prototype LH #521] [jddalton, Stefan Esterer]
* Ensure Array#last won't attempt a -1 index with zero length arrays. [Prototype LH #236] [jddalton, kangax]
* Minor source and whitespace cleanup. [jddalton]
* Cleanup stylesheet load detection in dom-loaded.js and implement a better detection scheme. [Diego Perini, jddalton]
* Optimize private method nodeListSlice() by replacing $A() calls with a while-loop and remove its dependency on the nodeList "length" property. [Diego Perini, jddalton]
* Optimize Hash#toJSON by using a direct reference of this._object instead of a clone. [jddalton]
* Remove dependency of Array#inject in Object.toQueryString, Hash#toQueryString and String#toQueryParams. [jddalton, Joe Gornick]
* Cleanup Object data type detection methods and utilize to access an objects ineternal [[Class]] property. [jddalton, kangax]
* unit test: Change all occurrences of window.location.toString() to window.location.href. [jddalton]
* Minor cleanup of Function#bind methods. [jddalton]
* Optimize private helper method prependList() and cleanup nodeListSlice(). [jddalton]
* Make document.viewport methods take advantage of the "root" private variable. [jddalton]
* Ensure Template#evaluate does not error when the evaluation object is null/undefined. [jddalton, J�rgen H�rmann]
* Add bgColor, vLink, and aLink to the Element._attributeTranslations.names mapping object. [jddalton, Thomas Lahn]
* Make Element#getOffsetParent follow the W3C specifications and treat TD, TH, and TABLE elements as valid offset parents. [jddalton]
* Make Element#cumulativeScrollOffset induce "onlyAncestors" on input fields and textareas. [Prototype LH #512] [Alex Farrill, jddalton]
* Add optional boolean second parameter, "onlyAncestors", to Element#cumulativeScrollOffset.
When "onlyAncestors" is true only the element's ancestors scroll offsets are totaled. [jddalton]
* Cleanup minor whitespace/formatting in helpers.js and event.js as well as rewrite the "testObserverExecutionOrder" event unit test. [jddalton]
* Create an optimized Array#invoke that avoids Array#map and uses reverse while-loops. [jddalton]
* Optimize Function#(bind|bindAsEventListener) by avoiding mergeList() when no arguments are passed. [Garrett Smith, jddalton]
* Make the Event dispatcher create a clone of its handlers before executing to avoid issues with nested observe/stopObserving calls. [Diego Perini, jddalton]
Note: This update exposes a bug in Gecko/WebKit browsers when dealing with nested stopObserving calls.
* Optimize Element.extend() further by replacing for-in loops with reverse while-loops. [jddalton]
* Fix IE error when passing a malformed string to document.getElementById()/document.getElementByTagName(). [Rails Trac #11568] [gryn, jddalton, kangax]
* Add Feature test FUNCTION_TO_STRING_RETURNS_SOURCE in preparation for Class rewrite. [jddalton]
* Add Element#isFragment to detect if an element is an unattached fragment or a child of one. [jddalton]
* Fix issue, in quirks mode, where versions of Safari, before 3.1.2, treat class names case-insensitively in Selector/$$ queries. [Prototype LH #390] [Andrew Dupont, Brice, kangax]
* Make String#strip use custom whitespace character class for browsers missing full support. [dimik, doug, jddalton, kangax]
Originally reported on
* Enhance Selector#match to support a "group" (comma-separated) selector. [Prototype LH #318] [Andrew Dupont, jddalton, wiktor]
* Make String#stripTags work properly with tags that contain closing brackets in their attributes. [jddalton, kangax]
* Stop Enumerable#grep, Array#grep, and String#gsub from freezing when passed an empty string as a pattern. [jddalton, kangax]
*FuseJS Alpha* (December 6, 2008)
* Add private helper method isHostObject() to correctly detect host methods and properties. [David Mark, jddalton]
* Massive code rewrite and restructuring [Prototype LH #677]
- Adopt new coding pattern [jddalton, kangax, Tobie Langel]
- Restructure file system to accommodate custom builds [jddalton, T.J Crowder, Tobie Langel]
- Backwards compatibility change for Ajax.Responders.responders property [jddalton]
- Update .gitignore files to ingore raked and temporary files [bkerley]
- Adjust edge case unit tests [jddalton]
* unit test: Make Ajax unit tests work in Safari 2, stop Dom unit tests from crashing Opera 9.2x on OS X, and perform minor cleanup on Form and Dom unit tests. [jddalton]
* Fix Element#insert on colgroup and optgroup elements by adding entries to Element._insertionTranslations.tags. [jddalton]
* Rewrite the Element._attributeTranslations object to reduce its code size. [jddalton]
* Modify Prototype.Browser.MobileSafari to return true for iPod Touch. [Prototype LH #439] [jddalton, Olek Poplavsky]
* Make Form.serializeElements() and Form.Element.Methods.serialize() skip type="select-multiple" select elements that have no selected value. [Prototype LH #440] [jddalton, Shanrong Zhao]
* Moved browser feature/bug tests to private methods "Feature" and "Bug". [jddalton, kangax, Nick Stakenburg]
* Make use of native Array methods "every", "filter", "map" and "some" if available. [Prototype LH #317] [jddalton, fearphage]
* Drop support for Prototype created Array#reduce because it conflicts with the JavaScript 1.8 definition. [jddalton]
Note: Backwards compatibility warning.
* unit test: Add check for WebKit marginRight bug #13343 to Element#getStyle tests. [jddalton]
* Consolidate WebKit fork of Element#cumulativeOffset and make cumulativeOffset handle "fixed" positioned elements. [jddalton]
* Reduce code duplication in Element#viewportOffset by using Element#cumulativeOffset. [jddalton]
* Make Object.isString() and Object.isNumber() work with values created by the Number/String constructor. [Prototype LH #375] [Andrew Dupont, atrepp, jddalton, kangax]
* Simplify the Template.Pattern RegExp. [jddalton]
* Fix Template#evaluate stripping the "before" match when passing an object.toTemplateReplacements() that returns a null/undefined value. [Prototype LH #237] [jddalton, Nir]
* Remove "finally" block from PeriodicalExecuter.onTimerEvent() because it's not needed and fails in IE without a "catch" block. [Prototype LH #421] [jddalton, Ville Koshinen]
* Optimize String#(extractScripts|stripScripts) by minimizing use and caching regular expressions. [Prototype LH #431] [jddalton, MIYAMUKO Katsuyuki]
* Optimize Selector class by removing unused variables, speeding up loops, and taking advantage of the element.children collection. [jddalton]
* Fix Java applet "java.lang.NosuchFieldException" error, in JRE v1.6.0_10, when accessing undefined element properties like "_extendedByPrototype". [Prototype LH #354] [Hilberty, jddalton, kangax, Matt McKeon, Prasad]
* Optimize Element.extend() by reducing the number of "for loops" in the method. [jddalton]
* Implement a revision system in Element.extend() so that elements extended before a Element.addMethods() call will be re-extended when run through Element.extend() again. [Rails Trac #9812] [jddalton, vectoroc]
* Add private helper method getOwnerDoc() and utilize element.ownerDocument to allow CSS queries and DOM dom traversal against iframes. [Rails Trac #11475] [jddalton]
* Fix regexp in Selector.split() that caused Firefox 3 to freeze. [Prototype LH #408] [jddalton, kangax, Shawazi, William Warby]
* Ensure Form.Element#(select|focus) return an element. [jddalton]
* Optimize method execution speed by using the static Element methods instead of the DOM element methods. [jddalton]
* Optimize Array#clone by using slice() helper method. [jddalton]
* Add private helper methods mergeList and prependList to replace Array#concat usage. [jddalton, Tobie Langel]
* Optimize Function bind, bindAsEventListener, curry, methodize and wrap to avoid Array#concat and Function#apply when not needed. [Prototype LH #215] [kangax, Tobie Langel]
* Add private helper method nodeListSlice() to complement slice(). [jddalton]
* Cleanup whitespace in source files. [jddalton]
* Wrap Prototype in a closure to take advantage of private variables and methods. [jddalton]
* Remove browser sniffs in Selector.handlers "mark" and "concat". [jddalton, kangax]
* Remove browser sniffs for Safari's $A() and Opera's Array#concat redeclaration. [jddalton, kangax]
* Remove IE code related to "fixed" positioned elements because IE doesn't support "fixed" elements. [jddalton]
* Remove|Number|String) from internal use in favor of simple "typeof" operators. [jddalton]
* Overwrite Array.prototype methods assigned by Enumerable with optimized equivalents. [jddalton]
* Optimize by using "_each" instead of "each" where applicable. [Rails Trac #9092] [jddalton, sylvainzimmer]
* Preserve inline display style when using Element#show and Element#hide. [Rails Trac #3868] [anonymous, Tobie Langel]
* Fix issue where Function#argumentNames returned incorrect results in IE when comments were intermixed with argument names. [Prototype LH #397] [Christophe Porteneuve, T.J. Crowder]
* unit test: Reorganize the unit test lib. [Tobie Langel]
* Make Element#viewportOffset take advantage of getBoundingClientRect()'s speed boost when supported. [Andrew Dupont, Andrew Kaspick, jddalton]
* unit test: Add/modify unit tests for Event observe/stopObserving and Element#(absolutize|relativize|scrollTo|viewportOffset). [jddalton, Nick Stakenburg]
* For consistency, add additional optional parameter "context" to Number#times. [Rails Trac #9252] [rmm5t, Samuel Lebeau]
* Selector.patterns should be represented as an ordered structure. [Prototype LH #315] [ADO, kangax]
* Correct inconsistencies in Selector.patterns "attrPresence" and "attr" which allow attributes with dashes to be matched. [Prototype LH #285] [leiyou, jddalton, kangax]
* Ensure Form.reset() returns a reference to the form element. [Prototype LH #309] [Phil, kangax]
* Give Enumerable#invoke support for invoking host objects' methods that don't have apply(). [Prototype LH #278] [Garrett Smith, jddalton, kangax]
* Ensure String#gsub escapes special characters if pattern is a string. [Prototype LH #252] [jddalton, Marton Kiss-Albert]
* Ensure Enumerable#grep escapes special characters if regex is a string. [Prototype LH #257] [jddalton, Marton Kiss-Albert]
* Ensure Element#adjacent matches the css expression against siblings and not children of siblings. [Prototype LH #244] [jddalton, Jean-Philippe]
* Ensure Element#descendants always returns an array. [Prototype LH #373] [kangax]
* Optimize Event.pointerX() and Event.pointerY() to calculate one coordinate instead of both. [Prototype LH #403] [jddalton, Nick Stakenburg]
* Optimize Element#getWidth and Element#getHeight to calculate one dimension instead of both. [jddalton]
* Add helper methods Element.(_getCssDimensions|_getCssWidth|_getCssWidth) to reduce repeated code. [jddalton]
* Add helper method Element._hasLayout to reduce repeated code. [jddalton]
* Add helper method Element._getRealOffsetParent to ensure offsetParent is accurate and prevent errors in Element#(cumulativeOffset|positionedOffset|viewportOffset). [Rails Trac #9416, #10192, #10248] [jddalton, kangax, psiborg, ronstoney]
* Stop Element#getOffsetParent from erroring in IE if the element isn't attached to the document. [jddalton, Tobie Langel]
* Fix IE issue with Element#getOffsetParent returning documentElement on some relatively positioned elements when using a strict doctype. [Prototype LH #90] [jddalton, Nick Stakenburg]
* Ensure Element#readAttribute works properly when accessing the invalid "type" attribute of an iframe. [Prototype LH #118] [Zekid, kangax]
* unit test: Add support for the Chrome browser in jstest.rb. [Andrew Dupont]
* Refactor Element#setOpacity to refine browser sniffs and move forked versions closer together. [jddalton]
* Refactor Element#update to remove browser sniffs. [jddalton]
* Optimize Element#(insert|update|replace) using a document fragment. [jddalton]
* Refactor Element#replace to remove browser sniffs. [jddalton]
* Fix IE issue with Element#replace removing childNodes of the returned element. [Rails Trac #11225] [Rukawa, jddalton]
* Refactor the Element constructor to remove browser sniffs. [jddalton]
* Ensure setting type attribute for button/input elements works in IE when using the Element constructor. [Rails Trac #10548] [jddalton, sakarit]
* Ensure Element#getStyle returns values in px unit, regardless of how they are set. [Andrew Dupont, jddalton, Joe Gornick]
* Refactor Element#getStyle to remove browser sniffs and move forked versions closer together in the code. [jddalton]
* Make only return a value for code wrapped in an anonymous function. [Prototype LH #184] [Garrett Smith, jddalton]
* Stop window "onload" observers from firing before the "dom:loaded" observers.
Enforce first-in-first-out observer execution order if the browser doesn't. [Rails Trac #9394] [jddalton, Samuel Lebeau]
* Optimized Event observe/stopObserving and consolidated closures in event.js. [jddalton]
* Ensure all stylesheets have loaded before firing dom:loaded event. [Prototype LH #328] [Diego Perini, jddalton, zichzach]
* Implement Diego Perini's "doScroll" technique for DOMContentLoaded event support in IE. [Diego Perini, jddalton]
* unit test: Added ability to append the query param delay=n to any resource URI to delay its loading by "n" seconds. [jddalton]
* Add Event#getEventID to fix issues with event IDs on elements created by Element#cloneNode. [jddalton]
* Rewrite Event cache to avoid memory leaks in IE and unnecessary iterations. [Prototype LH #230] [jddalton]
* Ensure dom:loaded timer is always cleared. [Prototype LH #346] [Mike Belshe]
* Remove unused local variable "h" from Selector.handlers.child(). [Prototype LH #246] [jddalton]
* Fix issue where Opera 9.5 gets confused by complex selectors in $$(). [Prototype LH #157] [Andre Dupont. Paulo Pereira, Andrea Baron, jddalton]
* Make Element#readAttribute follow W3C specifications for Element#getAttribute by returning an empty string if there is no specified/default value. [jddalton]
* Ensure Form.serializeElements() does not return keys from the prototype chain (e.g., constructor, valueOf, toString). [Rails Trac #9609] [gryn, jddalton, kangax]
* Rewrite Form#serializeElements() making it more closely follow the W3C specifications. [Prototype LH #22, #85] [jddalton, kangax, Lonesome Boy]
- Simulate input type=image coordinates with "x" and "y" options.
- Make the "submit" option accept the element or element name.
- Non-active submit buttons, disabled elements, input type=(file|reset), and null values are not serialized.
* Make Form#request pass the "submit" option to Form#serialize. [Prototype LH #66] [Ben Sommerville, jddalton, jodosha]
* Make $F return null for unknown/unsupported elements. [Rails Trac #8381] [Christophe Porteneuve, jddalton, Michael Stillwell]
* Make Form.Element#clear uncheck checkboxes/radio buttons, clear text inputs, deselect dropdown lists options, and skip button elements. [Prototype LH #955] [jddalton, victor]
* Extend BUTTON elements with Form.Element.Methods. [Rails Trac #9708] [jddalton, mensler]
* unit test: Cleaned up testFormActivating unit test. [jddalton]
* Ensure Form#focusFirstElement skips Form.Element#activate if there is no first element. [Alexander Chernin, kangax]
* Rename confusing variables in [Prototype LH #180] [jddalton]
* Rewrite document.viewport methods getDimensions, getWidth, and getHeight to avoid browser sniffs, increase speed, and fix Opera 9.5 support. [Prototype LH #337] [jddalton, Nick Stakenburg]
* Fix Element#clonePosition issues with element margins, borders, and padding. [Rails Trac #11613] [azazel, jddalton, Nick Stakenburg]
* Minor cleanup to Element#cumulativeOffset and Element#positionedOffset. [jddalton]
* Fix Element#cumulativeScrollOffset for Opera 9.25/9.5. [Rails Trac #10486] [jddalton, Nick Stakenburg]
* Make Element#cumulativeScrollOffset stop calculating scroll position after a "fixed" positioned element. [Rails Trac #10869] [jddalton, kangax, watersco]
* Use Element#cumulativeScrollOffset in Element#viewportOffset to reduce code duplication. [jddalton]
* Make Element#absolutize account for margins, padding, and borders. [Rails Trac #8024, #9918] [chiefcll, jddalton, pphilipp, Nick Stakenburg]
* Make Element#relativize throw an error if Element#absolutize wasn't previously called. [Andrew Dupont, jddalton]
* Remove overly complex position code from Element#relativize and Element#absolutize. [jddalton]
* Make Element.extend() skip XML nodes to avoid errors in IE. [Rails Trac #9709] [jddalton, yanick.rochon]
* Rewrite String#escapeHTML and String#unescapeHTML to ensure more consistent output across browsers. [Rails Trac #8452] [jddalton, slusarz, Tobie Langel)
* Make sure Event#stopObserving works when passed non-string value as an eventName. [kangax]
* Cleaned up event.js renaming confusing/contradictory variable names [jddalton]
* Fix Event.stopObserving() IE error on elements with no observers. [jddalton]
* Prevent getEventID from assigning `window` and `document` an eventID. [jddalton]
* Fix error when calling Event.stopObserving(window). [Prototype LH #30] [jddalton, kangax]
* Fix bug in getEventID where an array is returned instead of a number. [Prototype LH #228] [jddalton]
* Improve NodeList detection for Safari's $A function. [Prototype LH #187] [Garrett Smith, jddalton]
* Use different tactic to sniff for Opera in order to avoid false positives in IE. [Prototype LH #172] [Tobie Langel, jddalton]
* Ensure finds the proper element even when it's not attached to the document. [Prototype LH #198, #271] [jddalton]
* Ensure Element#getDimensions only unhides elements that are hidden. [Andrew Dupont, Nick Stakenburg, jddalton]
* Make Element#getDimensions use offset(Height|Width) rather than client(Height|Width). [Rails Trac #10122] [demian85, jddalton, Nick Stakenburg]
* Fix for IE7 to access local files via Ajax.Request. [Rails Trac #8259] [Andrew Dupont, hagen.seifert, jddalton]
* Make Object.isNumber check that the number is finite (rather than NaN or +/-Infinity). [Rails Trac #10349] [mkim]
* Ensure Object.isHash handles "falsy" values properly. [jddalton]
* Ensure Object.isElement handles "falsy" values properly. [kangax]
* Ensure Hash does not return keys from the prototype chain (e.g., constructor, valueOf, toString). [kangax]
* Fix toString/valueOf sharing same method reference via closure in Class#addMethods. Use plain property assignment, since Object.extend fails to enumerate over toString/valueOf. [Rails Trac #10841] [broofa, kangax]
* unit test: Update DOM unit tests to avoid failing on Element#replace tests in Opera. [Andrew Dupont, jddalton]
* Ensure Element.Methods.Simulated.hasAttribute() returns a boolean value. [jddalton]
* Ensure Array#intersect returns correct result if intersect value is 0. [jddalton]
* Ensure Element#hide and Element#show return an element, even if passed an element ID. [jddalton]
* Ensure IE $(form).readAttribute('id') behaves properly when child element has id='id' or name='id'. [Rails Trac #11092] [Prototype LH #89] [jddalton]
* Stop Form.Element.disable from stealing focus. [Rails Trac #11214] [kangax, sjoekie]
* Ensure String#escapeHTML escapes double quotes. [Rails Trac #10622] [kangax]
* Make String#extractScripts remove commented out scripts and remove the "m" RegExp flag from String#(extractScripts|stripScripts). [Rails Trac #9599] [bubbatls, jddalton]
* Fix scriptFragment Safari bug with non-ASCII characters in scripts. [Rails Trac #9663] [Alexey Proskuryakov, jddalton]
* Remove the use of $() in Element#hasAttribute methods to keep Selector class speedy. [Andrew Dupont]
* Ensure Element methods run the element argument through $(). [Rails Trac #11472] [jddalton]
* Set document.loaded = true before firing dom:loaded custom event. [Rails Trac #11453] [choppsta, jddalton]
* Avoid potential memory leaks in Firefox. [Prototype LH #12] [wpc, Tobie Langel]
* unit test: Add more unit tests for Object.isHash. [Tobie Langel]
* Fix Element#getStyle returns null if value is "auto" in browsers supporting getComputedStyle(). [Rails Trac #10116] [kangax, ylucas]
* unit test: Add unit tests for #10150, no patch needed because issue is already resolved. [jddalton]
* Fix Element read/write attribute methods for the 'encType' form attribute in IE. [Rails Trac #11126] [kangax, NoiseEee]
* Element#down on an input element should not raise error. [Rails Trac #11102] [humeniuc, kangax]
* Make Function#argumentNames handle multiple spaces and line breaks between arguments. [Prototype LH #63] [Geoff M. Granum, Tobie Langel]
* Speed up Function#argumentNames. Avoid Enum dependency. [Samuel Lebeau, Tobie Langel]
* unit test: Amended failing Element#identify test. [Andrew Dupont, jddalton]
* Fix an issue with calling Event.pointer before the DOM is loaded. [kangax, jddalton] [Prototype LH #4]
* Account for context to assure Element#down, et al., work properly with Selectors API. [Andrew Dupont]
* Fix issue where Safari improperly reports an element as a descendant of itself. [Andrew Dupont]
* Greatly simplify IE's implementation of Element#descendantOf. [Andrew Dupont]
* Prevent exception when using Selector to search for an attribute that is not present. [Rails Trac #11395] [gryn, Andrew Dupont]
* Fix Firefox Event.element() returning the wrong node for image onload/onerror events.
Also fixe Event.element() exception in IE when called from a window event observer. [Rails Trac #8652, #11296, #11259] [dcrall, jddalton, kangax]
* Fix issue where Safari 3 deletes custom properties from the document object when the page is returned to via the back button. [Rails Trac #11430] [mzsanford, kangax, Andrew Dupont]
* Integrate support for the W3C Selectors API into the Selector class.
Will now use the API when possible (browser supports the API *and* recognizes the given selector).
Means minor changes to the semantics of :enabled, :disabled, and :empty in order to comply with CSS spec. [Prototype LH #1] [Andrew Dupont]
* Avoid re-extending element in Element#getDimensions. [kangax]
* Prevent Hash#toQueryString from serializing objects. [kangax, Tobie Langel]
* Fix Event#pointer in IE strict and quirks mode. [Rails Trac #9920] [ephogy, kangax, Tobie Langel]
* Refactor String#escapeHTML to avoid using the `with` statement. [Tobie Langel]
* Make Element#writeAttribute handle frameborder attribute in IE. [Rails Trac #11068] [Nick Stakenburg, Tobie Langel]
* Minor cleanup of selector.js. [Rails Trac #10844] [Richard Quadling]
* Make String#unescapeHTML strip tags in IE. [Rails Trac #10173] [kangax]
* Performance improvements for Enumerables. [Rails Trac #11264] [Ben, Samuel Lebeau]
* Make tagName comparisons XHTML-compliant. [Rails Trac #11012, #11013, #11014] [cfis, Tobie Langel]
* Avoid breaking Element.prototype in browsers which support it. [Rails Trac #11004] [cfis, Tobie Langel]
* Prevent Enumerable#eachSlice from entering into an endless loop if passed an argument smaller than 1. [Rails Trac #10665] [kangax, Tobie Langel]
* Allow Selector to correctly detect the presence of namespaced attributes. [Rails Trac #10987] [Samuel Lebeau, Tobie Langel]
* Make Element#absolutize and Element#relativize always return element. [Rails Trac #10983] [kangax]
* unit test: Fix local variables, stop observers, correct css/html and fix Test.Unit.Logger#getMessageCell. [jddalton]
* unit test: Fix exiting test task on INT signal. [Samuel Lebeau]
* unit test: Fix unit test freeze in IE. [Tobie Langel]
* unit test: Instanciate Test.Unit.Logger on window load. [Tobie Langel]
* unit test: Remove usage of the 'with' statement from unit tests. [Tobie Langel]
* unit test: Cleanup. [Tobie Langel]
* unit test: Stop form observers in unit tests. [Rails Trac #10938] [kangax]
* deprecation extension: Complete rewrite of the deprecation helper, now renamed UpdateHelper and useable by third-party libs. [Tobie Langel]
* deprecation extension: Mark Hash.toJSON() as removed. [Tobie Langel]
* deprecation extension: Mark Class.create() used without arguments as deprecated. [Tobie Langel]
* deprecation extension: Mark Event.unloadCache as removed rather than deprecated. [Tobie Langel]
* deprecation extension: Log everything *but* deprecations with console.error. [Tobie Langel]
* deprecation extension: Use Firebug's console.warn and console.error. [Andrew Dupont, Tobie Langel]
* deprecation extension: Add deprecation extension. [Tobie Langel]
** (January 25, 2008)
* Update the list of officially supported browsers in the README. [sam]
* Add tests for Element#descendantOf that deal with dynamically-created elements. [Andrew Dupont]
* Ensure positionedOffset properly considers "position: fixed" elements. Also ensures IE reports offsets correctly by triggering hasLayout when a "static" element has a "fixed" element as an offset parent. [Rails Trac #10644] [heygrady, kangax, Andrew Dupont]
* Roll back the fix for #9609, since it does not work in Opera. Instead, avoid using "valueOf" or "toString" as field names in forms.
* Prevent DOM node expandos _countedByPrototype and _prototypeEventID from being serialized into (inner|outer)HTML in IE. [Rails Trac #10909] [dcpedit, Tobie Langel, Andrew Dupont]
* Make Ajax.Request#isSameOrigin JavaScript Lint compliant. [Andrew Dupont]
* Properly serialize form fields with names that collide with built-in JS properties (like "length" or "toString"). [Rails Trac #9609] [gryn, kangax]
* Make Object.isArray correctly identify arrays created in another frame. [Rails Trac #10374] [pointy, Dean Edwards, Andrew Dupont, Tobie Langel]
* Fixed issue where Element#match failed on attribute selectors with single or double quotes. [Rails Trac #10067] [Cezary Okupski, Andrew Dupont]
* Add tests for Element#match. [Tobie Langel]
* Fix Element#writeAttribute to work with 'cellspacing' and 'cellpadding' attributes in IE. [Rails Trac #9983] [/dev/urandom, Tobie Langel]
* Prevent a potential security issue for cross-site ajax requests. [Alexey Feldgendler, sam, Tobie Langel]
* Test for attribute existence before applying more complex CSS3 selectors. [Rails Trac #10870] [arty, Tobie Langel]
* Fix "function $A" declaration inside of a conditional (confuses IE). [Rails Trac #10882] [Jacco, Andrew Dupont]
* Fixed selector parsing so that "#foo [bar=baz]" is treated the same way as "#foo *[bar=baz]". [Rails Trac #10734] [jlukas, kangax, Andrew Dupont]
* Fix Element#descendantOf logic in IE. [Rails Trac #10413] [martymix, kamil.szot]
* Fix missing "var" in Element#insert. [Rails Trac #10838] [Lantash]
* Add Test.Unit.MessageTemplate class. Add flunk, buildMessage and assertBlock methods to Test.Unit.Assertions. Refactor accordingly. [Tobie Langel]
* Remove useless binding in Template#evaluate. [Tobie Langel]
* Make Object.inspect more robust. [Tobie Langel]
* Add a description to :test and :dist rake tasks. [Christoph Sturm]
* Fix Selector.matchElements to allow for coma-separated selectors in Element#up/next/previous and Event#findElement. [Samuel Lebeau, Tobie Langel]
* Test.Unit refactoring. Allow running multiple instances of Test.Unit.Runner on the same page. Allow rake to run specific testcases (e.g.: rake test BROWSERS=firefox TESTS=array TESTCASES=testUniq,test$w). [Rails Trac #10704 #10705, #10706] [nicwilliams, Tobie Langel]
* Optimize property detection of outerHTML. Avoids triggering FOUC in Safari 3.0.4. [Rails Trac #10702] [subimage, Tobie Langel]
* Add document.loaded, a boolean that is set to true once dom:loaded is fired. Setting document.loaded to true before the document is loaded prevents dom:loaded from being fired. [Tobie Langel]
* Make Element#insert standard-compliant. Fixes an issue in FF3b2 when inserting HTML or text inside DOM nodes which aren't (yet) appended to the document. [Tobie Langel]
* Add some missing semicolons to the source tree. [Rails Trac #10659] [Richard Quadling]
* Ensure Ajax.Response#getHeader returns null for missing headers in Opera. [Tobie Langel]
* Allow WEBrick to simulate slow or dropped connections and to ease Ajax request inspection. [Tobie Langel]
* Ensure Ajax.Response#getHeader returns null for missing headers. [Tobie Langel]
* Ensure $A creates an empty array when its argument's length is undefined. [Rails Trac #10574] [henryju, Tobie Langel]
* Fix incorrect variable declaration in [Rails Trac #10329] [rubley]
* Fix the way Selector handles [pseudoclass + combinator] with no space in between. [Rails Trac #9696] [kangax, fearphage, Andrew Dupont]
* Optimize Element#up/down/next/previous. [Rails Trac #10353] [Dylan Bruzenak, Nick Stakenburg, Andrew Dupont]
* Handle case-sensitivity in Selector tag names better. [Rails Trac #5052] [mexx, Andrew Dupont]
** (December 4, 2007)
* Change document.viewport.getDimensions to exclude scrollbars in all cases. [Rails Trac #10148, #9288] [Nick Stakenburg]
* Add logic to Element#getStyle in Opera that fixes inaccurate reporting of computed 'width' and 'height' properties. [Andrew Dupont]
* Ensure that an Ajax.Request's parameters option can be a Hash. [Rails Trac #10172] [kangax, sam]
* Ensure no comment nodes are returned in Selector queries (IE improperly returns comment nodes on getElementsByTagName("*")). Change Element#descendants to use Element#getElementsBySelector in order to avoid this issue. [Rails Trac #10220] [Jeff Gobel, Andrew Dupont]
* Re-enable the XPath approach in Selector for Safari 3. Falls back to the non-XPath version when it sees a problematic token. [Andrew Dupont]
* Fix a bug in the IE-specific Element#descendantOf logic. [Nicholas, Andrew Dupont]
* Make Ajax.Updater clone its options hash before modifying it. Prevents memory leaks in Ajax.PeriodicalUpdater. [Rails Trac #10049] [Mislav Marohnić, Tobie Langel].
* Remove useless variable in Selector.handlers.child. [Rails Trac #10006] [kuriyama]
* Don't redeclare previously declared variables. [Rails Trac #10007] [kuriyama]
* For consistency: use Object.isUndefined where possible. [Tobie Langel]
* Make String#isJSON return false for empty or blank strings. Make Ajax.Response#responseJSON null when Ajax.Response#responseText is empty or blank. [Andrew Dupont, Thomas Fuchs, Tobie Langel]
* Make Ajax.Response#_getResponseJSON use Ajax.Response#responseText. [Tobie Langel]
* Remove the forked declaration of Hash#_each. As we are now systematically cloning the object upon instantiation, preventing iteration of shadowed properties is no longer required. [Tobie Langel]
* Performance optimizations for Event#findElement. Make Event#findElement's expression argument optional, in which case the extended target element is returned (same as Event#element). [Tobie Langel]
* Ensure Event#fire always returns an extended event. [Tobie Langel]
*1.6.0* (November 6, 2007)
* Fix Class#addMethods for "toString" and "valueOf" methods in Internet Explorer. [Rails Trac #9901] [sam]
* Exclude Opera from using the sourceIndex approach in Element#descendantOf. [Tobie Langel, Andrew Dupont]
* Ensure Element#hasClassName always returns a boolean. [Rails Trac #10075] [ronnylovtangen, Tobie Langel]
* Ensure selectors of the form "[href]" (attribute token with no preceding tag name) work properly. [Rails Trac #8870] [chao, kangax, Andrew Dupont]
* Performance optimizations for Element#descendantOf. Costliness should no longer be dependent on the difference in depth between the parent and the child. [Andrew Dupont]
* Apply the workaround for the Firefox "blinking element" opacity=1 bug only to Firefox 1.5. [Thomas Fuchs]
* Add event.stopped, a boolean that is set to `true` when Event#stop is called. [Andrew Dupont, sam]
* Reset the browser's dimensions to their original settings after running the DOM viewport tests. [sam]
* Fix the test runner for Firefox in Leopard. [sam]
* Use String#include wherever possible.
* In IE, allow opacity to be set on elements not yet attached to the document. [Rails Trac #9904] [Thomas Fuchs, dcpedit, Tobie Langel]
* Avoid the try..catch block in Ajax.Response#_getResponseJSON unless required. [Tobie Langel]
* Add more tests to Element.update. [Rails Trac #9327] [Tobie Langel]
* Make the Ajax.Response#headerJSON property correctly decode unicode characters. [Rails Trac #9285] [Marius Feraru, Tobie Langel]
* Make sure Event and Event.extend are defined before wrapping events and calling their handler. Prevents a known Firefox bug from throwing errors on page load/unload (cf.: [Rails Trac #5393, #9421] [staaky, John Resig, sam, Tobie Langel]
* Minor cosmetic changes to the display of unit tests in terminal. [Tobie Langel]
* Make submitting forms work in Opera < 9.1. [Rails Trac #9917, #9463, #8260] [kangax]
* Fix template evaluation with empty replacements. [Rails Trac #9692] [Ryan McGeary]
* Hash#toTemplateReplacements is an alias for Hash#toObject so you can once again pass hashes to Template#evaluate and String#interpolate. [sam]
* Fix Event#is(Left|Middle|Right)Click in IE. [Rails Trac #7520] (again). [Mislav Marohnić]
*1.6.0_rc1* (October 16, 2007)
* Ensure Event.* generic methods work in IE, even when the event is not extended. [Viktor Kojouharov, Andrew Dupont]
* Don't translate "keypress" events into "keydown" events. [sam]
Note: "keypress" is broken in Safari <= 2.x, but Event#stop has no effect on "keydown" events.
* Changed Element#makeClipping to remember the original overflow value, even if it's a non-inline style. [Andrew Dupont]
* Cross-browser Event#isLeftClick with the addition of is(Middle|Right)Click. [Rails Trac #7520] [Christophe Porteneuve, Richard Quadling, Mislav Marohnić]
* Changed Selector to use the non-XPath approach for Safari 3 because of bugs in its version of document.evaluate. [Andrew Dupont]
* Changed the Selector regex that tests whether the selector can be expressed in XPath; added :checked, since XPath can't detect all scenarios in which an <input> is checked. Fixes #9776. [StelardActek, kangax, Andrew Dupont]
* Changed Selector pattern match so that descendant combinators after pseudoclass tokens are properly handled. Fixes #9696. [wiktor, kangax, Andrew Dupont]
* Make sure $w always returns an array. [Andrew Dupont, Tobie Langel]
* Add more tests to Hash. [Mislav Marohnić]
* Performance enhancements to $A. [Rails Trac #9464] [Samuel Lebeau]
* Make Function#argumentNames work with named functions. [Rails Trac #9826] [Samuel Lebeau]
* Add Object.isHash. [Tobie Langel]
* Performance improvements to String#times. [Martin Ström]
* Make Ajax.Response#getHeaderJSON and Ajax.Response#getResponseJSON pseudo private instance methods. [Tobie Langel]
* Make ObjectRange use the new Class.create syntax. [Mislav Marohnić]
* Fix a failing ClassCreate test case in IE. [Tobie Langel]
* Complete rewrite of the Hash class.
!! BACKWARDS COMPATIBILITY CHANGE !! This new version of Hash is NOT backwards compatible with the former Hash class.
Properties are now hidden away in an private store to prevent the risk of collision with Hash's instance and mixed-in methods.
This implies that properties of the hash can no longer be set, accessed or deleted directly: use the new Hash#get(key), Hash#set(key, value) and Hash#unset(key) instance methods instead.
- Make $H(object) equivalent to new Hash(object). Both now return a new (cloned) instance of Hash in all circumstances.
- Make Hash#merge non-destructive.
- Add Hash#update (a destructive version of Hash#merge).
- Add Hash#clone (returns a new, cloned instance of Hash).
- Add Hash#toObject (returns a clone of the contained object).
- Add Hash#get(key) (returns the value of the specified property).
- Add Hash#set(key, value) (sets the value of the given property. returns the value).
- Add Hash#unset(key) (deletes the specified property and returns its value).
- Add Hash.from as a alias to $H for consistency with Array.from.
- Add Object.toQueryString.
- Deprecate Hash.toQueryString (use Object.toQueryString or the instance method Hash#toQueryString instead).
- Remove Hash#remove (use Hash#unset instead).
- Remove Hash.toJSON (use Object.toJSON or the instance method Hash#toJSON instead). [sam, Tobie Langel]
* Element#wrap now returns the wrapper instead of the element being wrapped. [sam]
* Namespace all custom event names to avoid conflicts with native DOM events. [sam]
- All custom event names MUST include a namespace. Prefix custom event names for observe, stopObserving, and fire with the namespace followed by a colon. E.g."widget:activated")
- The "contentloaded" event is now "dom:loaded".
- The Event.DOMEvents array is no longer present. If an event name does not include a namespace, the event is treated as a native event.
* Clean up the new class API. [sam, Tobie Langel]
- Add Class#addMethods for adding instance methods to classes.
- Remove Class.extend and Class.mixin.
- Class.create now takes a variable number of arguments: if the first argument is a class, the newly created class inherits from that class; all other arguments are treated as successive calls to addMethods.
* Fix contentloaded event initialization in IE. [Rails Trac #9457, #9488, #9707] [Mislav Marohnić]
* Deprecate document.getElementsByClassName and Element#getElementsByClassName since native versions return a NodeList and we can only return an Array. Please use $$ or Element#select instead. [sam]
For more information see
* Fix missing "var" in selector.js. [Rails Trac #9761] [Tobie Langel]
* Date#toJSON now returns times in UTC for better compatibility with json.js. [Rails Trac #9332] [Tobie Langel]
* Ensure document._getElementsByXPath extends the elements it returns; fixes $$ not returning extended elements in Opera 9.2. [Rails Trac #8843] [jdalton]
* Update Prototype.Browser.MobileSafari for iPod touch compatibility. [sam]
* Add tests for Object.extend and Object.clone. [Tobie Langel]
* Add a test for Form.Observer. [Christoph Sturm]
* Make sure setting opacity works on elements that have "no layout" in IE. [Thomas Fuchs]
* Simplify Class.create by establishing a prototype chain when subclassing. [Rails Trac #9342] [Ben Newman]
* Fix Ajax.PeriodicalUpdater for compatibility with Ajax.Response. [Rails Trac #9321] [kampers]
* Ensure that classes always have an initialize method. [Mislav Marohnić]
* Update Template, Selector, Ajax.*, and ObjectRange classes to use the new class system. [Mislav Marohnić]
* Change Abstract.TimedObserver to subclass PeriodicalExecuter and tweak its subclasses to use new inheritance functionality. TimedObserver can now be stopped the same way as PeriodicalExecuter. [Rails Trac #8589] [Mislav Marohnić]
* Fix Class.mixin to extend the class's prototype. [Mislav Marohnić]
* Fix superclass method call breakage from [7337]. [Mislav Marohnić, sam]
* Change Class.extend to allow for superclass method resolution and remove Class.inherit. [Rails Trac #9274] [Samuel Lebeau]
* Event handlers are now bound to the observed element, not the event's target element. [Dan Webb]
* Define Node constants conditionally after checking for Node.ELEMENT_NODE presence. Add unit test to check the values of all constants. [Rails Trac #7625] [Mislav Marohnić]
* Make sure Enumerable#include doesn't do type comparision. [Mislav Marohnić]
* Add contextmenu to Event.DOMEvents. [Thomas Fuchs]
*1.6.0_rc0* (August 15, 2007)
* Fix readAttribute-related failure in form.html in IE. [sam, Andrew Dupont]
* Fix failing dom.html and selector.html tests in IE. [Tobie Langel, Andrew Dupont]
* Make sure the WebKit redefinition of Element#cumulativeOffset uses Element._returnOffset. [Rails Trac #9245] [mdaines]
* Make sure Element#observe and Element#stopObserving are always chainable. [sam]
* now returns the newly-fired event instead of the event's target element. [sam]
* Restrict Event.DOMEvents to include only events that can be supported in all browsers. [sam]
* Fix a failing test in base.html in Safari 2. [Tobie Langel]
* Fix Element#positionedOffset and Element#getOffsetParent for static elements on IE. [Thomas Fuchs]
* Make sure event handlers and their wrappers are removed from the cache by Event.stopObserving. [sam, Severin Heiniger]
* Add line numbers to failures when unit testing in Firefox. [Rails Trac #9231] [John Resig]
* Fix Function#argumentNames for Opera and IE. [Thomas Fuchs]
* Add Object.isString, Object.isNumber, and Object.isUndefined, and clean up the source to make use of Object.isXXX where possible. [sam]
* Add the document.viewport object for querying dimensions and scroll offsets of the browser viewport. [Andrew Dupont, Thomas Fuchs, sam]
document.viewport.getDimensions() // { width: 1149, height: 923 }
document.viewport.getWidth() // 1149
document.viewport.getHeight() // 923
document.viewport.getScrollOffsets() // { left: 0, top: 1592 }
* Add support for brackets in quoted attribute value selectors. [Rails Trac #9157] [Ken Snyder]
* Add some missing semicolons to the source tree. [Rails Trac #9140] [jdalton]
* Fix event extensions and custom events firing for Safari 2.0. [Thomas Fuchs]
* Add RegExp.escape for escaping regular expression strings. [Rails Trac #9094] [Ken Snyder]
* 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]
* 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ć]
document.observe("contentloaded", function() {
$$("a").invoke("identify"); // give all <a> tags an ID
* Add and 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]
* Extend the event object with methods from Event.Methods and normalize it in IE. [sam, Mislav Marohnić]
* Remove support for observing the capturing phase of DOM events, since we can't support it in all browsers. [sam]
* Add Ajax.Response object which supports the following methods: responseJSON, headerJSON, getHeader, getAllHeaders and handles browser discrepancies in the other response methods. Add sanitizeJSON, evalJS and evalJSON to Ajax.Request. [Rails Trac #8122, #8006, #7295] [Tobie Langel]
* Add an isRunningFromRake property to unit tests. [Tobie Langel]
* Add support for Opera browser in jstest.rb. [Tobie Langel]
* Inheritance branch merged to trunk; robust inheritance support for Class.create. [Rails Trac #5459] [Dean Edwards, Alex Arnell, Andrew Dupont, Mislav Mahronic]
- To access a method's superclass method, add "$super" as the first argument. (The naming is significant.) Works like Function#wrap.
- Class.create now takes two optional arguments. The first is an existing class to subclass; the second is an object literal defining the instance properties/methods. Either can be omitted. Backwards-compatible with old Class.create.
- Added Class.extend for dynamically adding methods to existing classes (while preserving inheritance chain). Can also be used for mixins.
- The 'constructor' property of a class instance always points back to the proper class. Class objects themselves have two special properties: 'superclass' and 'subclasses' (which default to 'null' and '[]', respectively). Allows for powerful introspection.
- Added Object.isFunction [sam]
* Add Function#argumentNames, which returns an ordered array of the function's named arguments. [sam]
* Prevent a crash in Safari 1.3 on String#stripScripts and String#extractScripts. [Rails Trac #8332] [grant, Tobie Langel]
* Add Prototype.Browser.MobileSafari which evaluates to true on the iPhone's browser. [sam]
* Optimize Selector#match and Element#match for simple selectors. [Rails Trac #9082] [Andrew Dupont]
* Remove the dependency on Element.ClassNames from Element#addClassName/removeClassName/toggleClassName, and deprecate Element.ClassNames. [Rails Trac #9073] [Tobie Langel]
* Make Element#wrap accept a second argument for setting attributes on the wrapper. Allow wrapping elements which are not part of the document. [Rails Trac #9071] [Tobie Langel]
* Improvements for Element#replace, Element#update and Element#insert. [Rails Trac #7429, #9060] [Tobie Langel]
- Element#replace/update/insert uses the argument's toElement or toHTML method if present (toElement has precedence if both are present).
- Element#replace and Element#update now also accept DOM elements.
- Element#replace better handles table-related elements in IE and Opera.
* Add Object.isArray and Object.isElement (returns true if the object is a DOM node of type 1). [Tobie Langel]
* Add Object.toHTML (uses the object's toHTML method if present or else passes the object to String.interpret). [Tobie Langel]
* Make Element#setStyle accept a string argument of CSS rules. Deprecate uncamelized style property names when setting styles using an object (for performance reasons). [Rails Trac #9059] [Tobie Langel]
$('id').setStyle('font-size: 12px; float: left; opacity: 0.5');
$('id').setStyle({fontSize: '12px', cssFloat: 'left', opacity: 0.5});
If you have code that looks like this:
$('id').setStyle({'font-size': '12px'});
You need to replace it with either of the following:
$('id').setStyle({fontSize: '12px'});
$('id').setStyle('font-size: 12px;');
* 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. [Rails Trac #9012] [Jeff Watkins, sam, Tobie Langel]
* Make Element#readAttribute work for cloned elements in IE. [Rails Trac #8481] [chem, Tobie Langel]
* Template enhancements. [Rails Trac #8166] [Christophe Porteneuve]
- Added String#interpolate as a shortcut for new Template(...).evaluate(...).
- 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.
- You can now substitute properties of template replacement values in template strings, using dot or bracket notation (or both). Example:
"#{name.last}, #{name.first[0]}. (#{location})".interpolate({
name: { first: "Christophe", last: "Porteneuve" }, location: "Paris"
}) // "Porteneuve, C. (Paris)"
* 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. [Rails Trac #7596] [Christophe Porteneuve, sam]
* Make String#scan explicitly return a string. This prevents possible issues with methods expecting input data that is typeof == 'string'. [Rails Trac #6350] [AndrewRev, Tobie Langel]
* 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]
[1,1,3,5].intersect([1,2,3]) -> [1,3]
* Rename Element#getElementsBySelector to Element#select and add alias for Element#getElementsBySelector. [Thomas Fuchs]
* Add Element#adjacent as a shortcut to selecting all adjacent nodes (and their children) that match a CSS selector. [Thomas Fuchs]
* Enhance the Enumerable and Array APIs to more closely match those of JavaScript 1.6 as implemented in Firefox 1.5. [Rails Trac #6650, #8409] [Mislav Marohnić, Sylvain Zimmer]
- Add Array#lastIndexOf, and change Array#indexOf not to overwrite the native method.
- Make Enumerable use Array.prototype.forEach instead of _each when possible (slight speed increase).
- Add "filter", "entries", "every", and "some" Array aliases.
- All Enumerable methods now have an additional parameter, "context", which, if present, specifies the object to which the iterators' "this" is bound.
- Function#bind and #curry now return the receiving function if the binding object is undefined.
* Temporary workaround for Prototype.BrowserFeatures.SpecificElementExtensions incorrectly evaluating to true on iPhone. (needs further investigation) [sam]
* 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ć]
* 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ć]
$('form').serialize({ submit: 'delete' })
$('form').serialize({ hash: false }) //-> equivalent to $('form').serialize()
* Form#findFirstElement respects HTML tabindexes. [Rails Trac #7595] [Christophe Porteneuve]
* 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. [Rails Trac #5902] [Jonathan Viney, Mislav Marohnić]
$('text_input').setValue('hello world!')
$('attend_classes').setValue(['cheese rolling', 'evil chemistry'])
* Make document.getElementsByClassName match a subset of the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 ( 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. [Rails Trac #8401] [Mislav Marohnić]
document.getElementsByClassName('foo bar')
* Fix a Safari rendering issue when floating elements could temporarily disappear when opacity was set to 1. [Rails Trac #7063] References #3044, #3813, #6706. [Thomas Fuchs, davidjrice]
* Prevent a crash in Safari when calling String#evalJSON(true) on very large strings. Add String#isJSON. [Rails Trac #7834] [Tobie Langel]
* Prevent a crash in Safari 1.3 on String#stripScripts and String#extractScripts. [Rails Trac #8332] [grant, Tobie Langel]
* Allow JSON data to contain line breaks. [Rails Trac #8271] [pijyster, Tobie Langel]
* Add Hash.prototype.index which returns the first found property that has a specific value. [Rails Trac #8528] [Thomas Fuchs, slusarz, Mislav Marohnić]
var hash = $H({a:1,b:'2'});
hash.index(1) // -> 'a'
hash.index('1') // -> undefined
* Ensure HTMLElement exists before creating Element.extend. [Tobie Langel]
* 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]
* Make Element#absolutize and Element#relativize properly use Element#getStyle. [Rails Trac #8580] [Christophe Porteneuve]
* Test library fixes: make rake dist work on Windows, only teardown if a browser is supported. [Rails Trac #8463, #8498] [Mislav Marohnić, grant]
* Change Element.insert syntax to allow multiple positions. [Thomas Fuchs]
Element.insert('foo', {top:'bar', bottom:'baz'});
$('foo').insert({after: new Element('p').update('bar')});
Element.insert('foo', new Element('p').update('bar')); // defaults to bottom
Element.insert('foo', 'bar'); // defaults to bottom
* 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]
* Event.findElement behaves as expected when the element passed matches the given selector. [Rails Trac #8395] [Mislav Marohnić, Tobie Langel]
* Element.setOpacity now calls removeAttribute on the filter style on IE if no more filters remain, which makes Cleartype work properly. [Rails Trac #8376] [alexdemi, Thomas Fuchs]
* Event.findElement now uses Element#up (and as a result can take a CSS selector instead of just a tag name). [Tobie Langel]
* Minor cleanup of the position methods [sam]
* Fix Element#clonePosition to call viewportOffset. [Rails Trac #8372] [graemenelson, Christophe Porteneuve]
* Prevent an error being thrown by $$ when #id does not exist in $$("div #id"). [Rails Trac #8325] [Tobie Langel, ecke]
* Make Prototype.ScriptFragment behave when including Prototype inline. [Christophe Porteneuve]
* 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]
* Make Element#update and Element#insert work for SELECT tags in IE and Opera. [Tobie Langel]
* Make Element#insert and Element#update better handle TABLE related elements in IE and Opera. [Rails Trac #7776, #8040, #7550, #7776, #7938] [Tobie Langel]
* Make Element#readAttribute('title') work in Opera. [Tobie Langel]
* Make Element#replace work with form elements in Firefox and Safari. [Rails Trac #8010, #7989] [dsl239, Tobie Langel]
* Add Element#wrap which wraps the element inside a new one. [Rails Trac #5732] [P. Vande, Tobie Langel]
* Make Element into a constructor: new Element(tagName, attributes). Add Element#writeAttribute which accepts a hash of attributes or a name/value pair. [Rails Trac #7476] [Mislav Marohnić, haraldmartin, Tobie Langel]
* 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'. [Rails Trac #7907] [Tobie Langel]
* Refactor Element.extend and eliminate Element.extend.cache. [sam]
* Add Function#curry, Function#delay, Function#defer, and Function#wrap. [Rails Trac #8134] [Andrew Dupont, Tobie Langel, sam]
*1.5.1* (May 1, 2007)
* Don't duplicate the event argument in Function#bindAsEventListener. [Rails Trac #6497] [wiktor]
* Fix Selector :not-clause chaining. [Andrew Dupont]
*1.5.1_rc4* (April 27, 2007)
* Fix $F breakage from [6598]. [sam]
* Set window.$continue to an Error with a helpful message for anyone who may still be using "throw $continue". [sam]
* Fix jstest.rb IE support so you don't have to close the IE window after each test (yay!). [Rails Trac #8207] [Ryan Schuft]
* Fix jstest.rb Konqueror support. [Rails Trac #7140] [Christophe Porteneuve]
* Fix regression in which no-argument calls to Element.addMethods() would not add the methods defined in Form.Methods and Form.Element.Methods. [Rails Trac #8206] [Tobie Langel, fwittekind]
* Fix Element#readAttribute to work with the 'type' attribute in IE. [Rails Trac #8160] [Tobie Langel, Wiktor Ihárosi]
*1.5.1_rc3* (April 24, 2007)
* Add Element#childElements as an alias for Element#immediateDescendants. [Tobie Langel]
* Optimize DOM navigation methods (Element#up, Element#down, Element#previous, Element#next) for no-argument calls. [Rails Trac #7848] [haraldmartin, sam]
* Add Element#firstDescendant to retrieve the first non-text child node of an element. [sam]
* Element.addMethods should add methods to Element as well as Element.Methods. [Rails Trac #7888] [Andrew Dupont]
* Add support for per-request onCreate callbacks to Ajax.Request. [Rails Trac #8011] [Andrew Dupont]
* Don't call evalResponse() when an Ajax response has no Content-type header. [Rails Trac #7827] [Tobie Langel]
* 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. [Rails Trac #7910] [Tobie Langel]
For more details on potential security problems, see:
* Add extra spacing so Array#toJSON and Hash#toJSON generate YAML-loadable JSON. [Rails Trac #7883] [Andrew Dupont]
* Fix Form.request for forms containing an input element with name="action". [Rails Trac #8063] [Thomas Fuchs, Mislav Marohnić]
* Make Event.element extend the returned element. [Rails Trac #7870] [Thomas Fuchs]
* Prevent a crash on Safari on String.prototype.stripScripts and extractScripts with large <script> tags. [Thomas Fuchs]
* Prevent linefeed normalisation in String.prototype.escapeHTML and unescapeHTML on IE for consistency with other browsers. Speed optimizations for Safari and IE. [Thomas Fuchs]
* Make Hash.toQueryString serialize undefined values. Ensure consistency with String.prototype.toQueryParams. [Rails Trac #7806] [Mislav Marohnić]
$H({a:'b',c:undefined}).toQueryString() -> 'a=b&c'
$H({a:'b',c:null}).toQueryString() -> 'a=b&c='
$H('a=b&c'.toQueryParams()).toQueryString() -> 'a=b&c'
$H('a=b&c='.toQueryParams()).toQueryString() -> 'a=b&c='
* Fix issues with Selector an+b logic, :not support, attribute selector double quotes, plus performance improvements. [Rails Trac #7873, #7901]. [Andrew Dupont]
* Fix Form.disable to work again on non-form elements. [Rails Trac #6887] [Mislav Marohnić]
* Fix an issue with String.prototype.endsWith. [Rails Trac #7822] [altblue]
*1.5.1_rc2* (March 12, 2007)
* Add a tab character via innerHTML to the selector whitespace test. [Christophe Porteneuve]
* Add an attribution to YUI-Ext's DomQuery in selector.js.
* Make Element.extend work on IE for Nodes with the same ID that where discarded. [Rails Trac #7497] [Mislav Marohnić, Thomas Fuchs]
* Make Selector correctly extend the first element it returns on IE. [Thomas Fuchs]
* Prevent a crash in Safari when using $A() on NodeList objects that contain text nodes. [Thomas Fuchs]
* Fix Element.Methods.descendants() to properly extend elements on IE. [Thomas Fuchs]
*1.5.1_rc1* (March 9, 2007)
* Fix readAttribute for IE7. [Andrew Dupont]
*1.5.1_rc0* (March 8, 2007)
* Merge the selector branch into trunk, bringing vast performance improvements, bug fixes, and near-complete CSS3 compliance to $$ and Selector. [Rails Trac #7568] [Andrew Dupont]
Selector speed test:
* Add support for JSON encoding and decoding. [Rails Trac #7427] [Tobie Langel]
* Fix double escaping of query parameters in Hash.prototype.toQueryString, and prevent Safari from iterating over shadowed properties when creating hashes. [Rails Trac #7421] [Tobie Langel, Mislav Marohnić]
* Fix simulated attribute reading for IE for "href", "src" and boolean attributes. [Mislav Marohnić, Thomas Fuchs]
* Form.Element.disable() will now call blur(), removed blur() call from Form.Element.enable(). [Rails Trac #6034] [tdd]
* Optimize document.getElementsByClassName and finalize DOM performance optimization refactoring. [Rails Trac #6696] [Mislav Marohnić]
* Fix an issue with serializing empty array inputs. [Rails Trac #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. [Rails Trac #7648] [Tobie Langel, Thomas Fuchs]
* Optimize Element.setStyle and add new Element.setOpacity method, special case IE and Gecko opacity methods. [Rails Trac #7585] [savetheclocktower]
* Add unified Browser detection by providing Prototype.Browser.(IE|Gecko|WebKit|Opera) booleans. [Rails Trac #6800] [savetheclocktower]
* Add String.prototype.empty and String.prototype.blank (tests if empty or whitespace-only). [Rails Trac #7016] [Jonathan Viney, Thomas Fuchs]
* Update README to reflect new URLs, update LICENSE copyright years. [Rails Trac #7426] [Tobie Langel]
* Array.prototype.uniq optimization. [Rails Trac #7417] [Christophe Porteneuve]
* String.prototype.endsWith should not fail on multiple occurrences. [Rails Trac #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. [Rails Trac #7358] [Andrew Dupont]
* Add String.prototype.startsWith, String.prototype.endsWith, and String.prototype.include. [Rails Trac #7075] [Tobie Langel]
* Improve performance of String.prototype.escapeHTML by using a cached div and text node. [Rails Trac #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. [Rails Trac #6649] [Mislav Marohnić]
* Fix attribute selectors for IE. [Rails Trac #5170] [Tobie Langel, Andrew Dupont]
* A slew of dom.js improvements. [Rails Trac #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. [Rails Trac #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. [Rails Trac #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. [Rails Trac #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]
'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]
'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. [Rails Trac #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]
<div id="widgets">
<div class="widget" widget_id="7">...</div>
<div class="widget" widget_id="8">...</div>
<div class="widget" widget_id="9">...</div>
$$('div.widget').invoke('readAttribute', 'widget_id')
// ["7", "8", "9"]
* Add Element.Methods.immediateDescendants, like $A($(element).childNodes) but without text nodes. [sam]
* More consistency. [Rails Trac #6573] [Bob Silva]
* String.prototype.toQueryParams and Hash.prototype.toQueryString now properly serialize arrays as multiple values. [Rails Trac #4436] [mislav, altblue, L`OcuS]
* Fix Form.serialize for options with empty values. [Rails Trac #5033] [tdd, Thomas Fuchs, sam]
* Add Element.Methods.Simulated for simulating HTMLElement methods in lesser browsers. Add hasAttribute as the first simulated method. [tdd, Thomas Fuchs, sam]
* Add a "retry with throw" button for test error messages. [sam]
* 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]
% BROWSERS=safari,firefox rake test
% TESTS=dom rake test
* Element.hasClassName now bypasses the Element.ClassNames API for performance. [sam]
* Pick some low-hanging performance and DRYness fruit. [sam]
- Inline length property accesses in for loops
- Enumerable-ize for loops where it makes sense
- Make better use of Element.Methods and Form.Methods/Form.Element.Methods
* A slew of Ajax improvements. [Rails Trac #6366] [mislav, sam]
Public-facing changes include:
- HTTP method can be specified in either lowercase or uppercase, and uppercase is always used when opening the XHR connection
- Added 'encoding' option (for POST) with a default of 'UTF-8'
- Ajax.Request now recognizes all the JavaScript MIME types we're aware of
- PUT body support with the 'postBody' option
- HTTP authentication support with the 'username' and 'password' options
- Query parameters can be passed as a string or as a hash
- Fixed both String.toQueryParams and Hash.toQueryString when handling empty values
- Request headers can now be specified as a hash with the 'requestHeaders' option
* Improve performance of the common case where $ is called with a single argument. [Rails Trac #6347] [sam, rvermillion, mislav]
* Fix Object.inspect to correctly distinguish between null and undefined, fixes #5941 [tdd, mislav]
* Don't serialize disabled form elements, fixes #4586 [tdd]
* Make HTML element classes extension mechanism for Safari not throw errors on WebKit beta versions [Thomas Fuchs]
* Add support for using Element.update() with no or a non-string parameter [Thomas Fuchs]
$('empty_me').update() -> clears the element
$('easy_as').update(123) -> set element content to '123'
* Add unit tests for hashes, fixes #6344 [Tobie Langel]
* Add clone() method to arrays, fixes #6338 [Tobie Langel]
* Backing out of [5194] (Element.clear) because of issues with IE on certain elements, #6051
* Add Element.clear for easily emptying out elements, fixes #6051 []
* Enumerable.each now returns the enumerable to allow for method chaining, fixes #6250 [eventualbuddha]
* Make makeClipping and undoClipping always return their element to stay chainable
* Fix an issue with certain Element chain calls not correctly extending elements with Prototype element methods on IE [Thomas Fuchs]
* Add Enumerable.eachSlice and Enumerable.inGroupsOf, fixes #6046 [, Thomas Fuchs]
[1,2,3,4,5].inGroupsOf(3) -> [[1,2,3],[4,5,null]]
[1,2,3].inGroupsOf(4,'x') -> [[1,2,3,'x']]
* Complete unit tests for array.js and string.js [Thomas Fuchs]
* Performance improvements for document.getElementsByClassName, including querying with XPath in supported browsers. [Andrew Dupont]
* Make Form.getElements() return elements in the correct order, fix broken Form.serialize return, fixes #4249, #6172 [, Thomas Fuchs, john]
* Add various DOM unit tests, fixes #6176, #6177 [tdd]
* 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]
* Form.Element.disable() and .enable() will now work correctly, fixes #6034 []
* Fix IE and Safari issues with Position.positionedOffset, add position.html unit tests, fixes #5621 []
* Fix an issue with Element.undoClipping and IE [Thomas Fuchs]
* Element.cleanWhitespace now correctly removes consecutive empty text nodes, fixes #3209 []
* Element.extend now does not try to extend text nodes, fixes #4642 []
*1.5.0_rc1* (September 4, 2006)
* bindAsEventListener now passes along any provided arguments after the event argument. [Rails Trac #5508] []
* Fix makeClipping and undoClipping with local overflow style values other than visible and hidden, fixes #3672 [Thomas Fuchs]
* Add Element.up, Element.down, Element.previous, and for easily traversing the DOM. (Inspired by Thomas Fuchs' original implementation of Element.up: [sam]
<div id="sidebar"> -> $('nav').up() or $('menu').up('div')
<ul id="nav"> -> $('sidebar').down() or $('sidebar').down('ul') or $('menu').previous()
<li>...</li> -> $('sidebar').down(1) or $('sidebar').down('li')
<li>...</li> -> $('sidebar').down(2) or $('sidebar').down('li', 2) or $('sidebar').down('li').next('li')
<li class="selected">...</li> -> $('sidebar').down('li.selected')
<ul id="menu"> -> $('sidebar').down('ul').next()
* Refactor $$ and Element.getElementsBySelector into Selector.findChildElements. [sam]
* Add Element.match, which takes a single CSS selector expression and returns true if it matches the element. [sam]
* Add Element.ancestors, Element.descendants, Element.previousSiblings, Element.nextSiblings, and Element.siblings. [sam]
* Add Element.inspect for better DOM debugging. [sam]
* Add an optional boolean argument to String.prototype.inspect which, when true, makes the string double-quoted instead of single-quoted. [sam]
* Add the uniq() method to Arrays, which returns a new Array with duplicates removed, fixes #3810 [secondlife]
* Add stop() method to PeriodicalExecutor, fixes #4801 [Jon Evans]
* Fix issues with Enumerable.any, ObjectRange.toArray, added unit tests, fixes #4419 [miyamuko, Thomas Fuchs]
* Fix two instances of unneccesarily redeclared variables, fixes #5229 [Thomas Fuchs]
* Fix a loop in Element.extend to properly use local variable, fixes #5128 [arrix]
* Add constants for additional keys in Event, fixes #5411, #5795 [simone_b]
* Workaround a DOM API bug in Opera in, fixes #2407, #5848 [Thomas Fuchs]
* Remove duplicate definition of Position.clone(), fixes #3765 [Thomas Fuchs]
* Make destructive Element, Form, and Form.Element methods return their first argument, so that multiple calls can be chained together. [sam]
ex. $("sidebar").addClassName("selected").show();
The following methods now return their first argument: Element.toggle, Element.hide,, 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.clear, Form.Element.activate, Form.Element.disable, Form.Element.enable.
* For consistency, Element.toggle,, Element.hide, Field.clear, and Field.present no longer take an arbitrary number of arguments. [sam]
If you have code that looks like this:'page', 'sidebar', 'content');
You need to replace it with code like this:
['page', 'sidebar', 'content'].each(;
* Mix in Form and Form.Element methods to forms and form field elements with $() and $$(). [Rails Trac #4448] [Dan Webb, sam]
* Add Object.clone [sam]
* Add Form.Element.disable and Form.Element.enable. [Rails Trac #4943] []
* Field is now simply an alias for Form.Element. [sam]
* Add Element.Methods.getElementsByClassName and Element.Methods.getElementsBySelector. [Rails Trac #4669] [Andrew Dupont, DHH, sam]
* Avoid race condition when stopping an Ajax.PeriodicalUpdater. [Rails Trac #4809] []
* Improve support for synchronous requests. [Rails Trac #5916] [sam,]
* Add serialization and observation support for input type=search. [Rails Trac #4096] []
* Properly decode query components in String.prototype.toQueryParams. [Rails Trac #3487] [sam]
* Add Array.prototype.reduce [sam]:
[1, 2].reduce() // [1, 2]
[1].reduce() // 1
[].reduce() // undefined
* Add Object.keys and Object.values [sam]
* Simulate non-GET/POST requests by POSTing with a _method parameter set to the actual verb [DHH]
* 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]
* Sync to unittest.js library as of 2006/08/29 [Thomas Fuchs]
* Add additional unit tests to test/unit/dom.html for testing Element.update and $().update in various enviroments [Thomas Fuchs]
* Prevent possible exceptions on unloading the page in IE [Thomas Fuchs]
*1.5.0_rc0* (April 5, 2006)
* Modify HTMLElement.prototype and short-circuit Element.extend where possible. [Rails Trac #4477] [Thomas Fuchs]
* Only observe window.onunload in IE for Mozilla bfcache support. [Rails Trac #3726] [Mike A. Owens]
* Don't redefine Array.prototype.shift. [Rails Trac #4138] [leeo]
* Prevent redefining Array.prototype.reverse more than once. [Rails Trac #3951] []
* Fix Enumerable.min/Enumerable.max to recognize the value 0. [Rails Trac #3847, #4190] [, Martin Bialasinski]
* Change Ajax.getTransport to prefer XMLHttpRequest in anticipation of IE 7. [Rails Trac #3688] [, sam]
* Make Array.prototype.flatten more robust. [Rails Trac #3453] [Martin Bialasinski, sam]
* Fix evalScripts from crashing Firefox if script includes 'var'. [Rails Trac #3288, #4165] [, sam]
* Scope iterators locally. [Rails Trac #4589] [sam]
* Support Insertion.Before/Insertion.After for <tr> elements in IE. [Rails Trac #3925] []
* Add a contentType option for overriding application/x-www-form-urlencoded in Ajax.Request. [Rails Trac #3564] [, sam]
* Surround values in the X-JSON header in parenthesis for better compatibility with Firefox. [Rails Trac #4118] []
* Fix Form.serialize to properly encode option values in multiple selects in IE. [Rails Trac #3291] []
* Cache methods added to DOM elements with Element.extend to prevent memory leaks in IE. [Rails Trac #4465] [, sam]
* 1.5.0_pre1* (March 26, 2006)
* Add attribute selector support for Selector (and $$). [Rails Trac #4368] []
$$('form#foo input[type=text]').each(function(input) {
input.setStyle({color: 'red'});
* 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]
* Make $$ work in IE. [Rails Trac #3715] []
* Add test/browser.html, which provides a simple object browser for the Prototype source (Firefox/Safari only). [sam]
* Add Element.extend, which mixes Element methods into a single HTML element. This means you can now write $('foo').show() instead of'foo'). $, $$ and document.getElementsByClassName automatically call Element.extend on any returned elements. [sam]
* Add Element.replace as a cross-browser implementation of the "outerHTML" property. References #3246. []
* Fix iterator behavior. [Marcin Kaszynski, sam]
*1.5.0_pre0* (January 18, 2006)
* Add String.prototype.truncate to complement the Action View truncate helper. [sam]
* 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]
* Add a Template class for interpolating named keys from an object in a string. [sam]
* Add the $$ function for finding DOM elements by simple CSS selector strings. [sam]
Example: Find all <img> elements inside <p> elements with class "summary", all inside
the <div> with id "page". Hide each matched <img> tag.
$$('div#page p.summary img').each(Element.hide)
* Add a Selector class for matching elements by single CSS selector tokens. [sam]
* Add Test.Unit.Assertions.assertEnumEqual for comparing Enumerables in tests. [sam]
* Add Element.childOf(element, ancestor) which returns true when element is a child of ancestor. [sam]
* Fix escaping in String.prototype.inspect. [sam]
* Add String.prototype.strip to remove leading and trailing whitespace from a string. [sam]
* Move Prototype to Rails SVN. [sam]
* Make the console nicer. [sam]
* Prune the source tree. [sam]