Sam Stephenson
c904fe7664
prototype: 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.
2007-10-08 21:29:27 +00:00
Sam Stephenson
8cf1f895f7
prototype: Ensure document._getElementsByXPath extends the elements it returns; fixes $$ not returning extended elements in Opera 9.2. Closes #8843 .
2007-10-08 19:01:31 +00:00
Thomas Fuchs
6c94af703d
Make sure setting opacity works on elements that have "no layout" in IE.
2007-08-27 18:37:49 +00:00
Thomas Fuchs
aa1a7f5bf0
prototype: Define Node constants conditionally after checking for Node.ELEMENT_NODE presence. Add unit test to check the values of all constants. Closes #7625 .
2007-08-17 11:20:56 +00:00
Sam Stephenson
d8b8c6586d
prototype: Fix readAttribute-related failure in form.html in IE.
2007-08-14 05:08:18 +00:00
Sam Stephenson
c27f2de373
prototype: Fix failing dom.html and selector.html tests in IE.
2007-08-14 04:14:22 +00:00
Sam Stephenson
c603fc5d42
prototype: Make sure the WebKit redefinition of Element#cumulativeOffset uses Element._returnOffset. Closes #9245 .
2007-08-13 15:15:01 +00:00
Thomas Fuchs
5f76c255a1
Fix Element#positionedOffset and Element#getOffsetParent for static elements on IE. DOM unit tests now pass on IE.
2007-08-10 14:19:30 +00:00
Sam Stephenson
df71a6b54f
prototype: Add Object.isString, Object.isNumber, and Object.isUndefined, and clean up the source to make use of Object.isXXX where possible.
2007-08-08 23:19:45 +00:00
Sam Stephenson
ae2ab03294
prototype: Add the document.viewport object for querying dimensions and scroll offsets of the browser viewport.
2007-08-08 20:42:46 +00:00
Sam Stephenson
c9a0485b60
prototype: Add some missing semicolons to the source tree. Closes #9140 .
2007-08-07 19:41:13 +00:00
Sam Stephenson
aa4602b459
prototype: Merge -r7242:HEAD from ../branches/1-6-0-events. Adds support for DOM-based custom events with Event.fire/Element.Methods.fire, cross-browser DOMContentLoaded support, extended and normalized event objects, and improvements to the observe and stopObserving APIs.
2007-08-04 07:20:45 +00:00
Sam Stephenson
1575435f5e
prototype: Element#classNames should still use the Element.ClassNames API for now
2007-07-24 20:53:32 +00:00
Sam Stephenson
a529bcf590
prototype: Remove the dependency on Element.ClassNames from Element#addClassName/removeClassName/toggleClassName, and deprecate Element.ClassNames. Closes #9073 .
2007-07-24 20:42:21 +00:00
Sam Stephenson
59c3dfd87a
prototype: Use Object.isElement
2007-07-24 19:10:44 +00:00
Sam Stephenson
c0735dba77
prototype: Make Element#wrap accept a second argument for setting attributes on the wrapper. Allow wrapping elements which are not part of the document. Closes #9071 .
2007-07-24 19:08:55 +00:00
Sam Stephenson
44ef74813b
prototype: Improvements for Element#replace, Element#update and Element#insert. Closes #7429 , #9060 .
2007-07-24 18:52:17 +00:00
Sam Stephenson
7b2ce66e88
prototype: Make Element#setStyle accept a string argument of CSS rules. Deprecate uncamelized style property names when setting styles using an object (for performance reasons). Closes #9059 .
2007-07-24 18:14:36 +00:00
Sam Stephenson
c6f3daadaa
prototype: Add Element#identify, which returns the element's ID if it exists, or sets and returns a unique, auto-generated ID (of the form 'anonymous_element_' + auto-incremented digit) otherwise. Use this when you need to ensure an element has an ID. Closes #9012 .
2007-07-24 17:41:27 +00:00
Sam Stephenson
7e6481bcd7
prototype: Make Element#readAttribute work for cloned elements in IE. Closes #8481 .
2007-07-24 17:31:23 +00:00
Thomas Fuchs
cea24d6cc2
Prototype: Rename Element#getElementsBySelector to Element#select and add alias for Element#getElementsBySelector. Add Element#adjacent as a shortcut to selecting all adjacent nodes (and their children) that match a CSS selector.
2007-07-13 08:36:14 +00:00
Sam Stephenson
d6bf5e40ce
prototype: Make document.getElementsByClassName match a subset of the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 ( http://www.whatwg.org/specs/web-apps/current-work/#getelementsbyclassname ). It now supports multiple class names given as a whitespace-separated list in a string. Array argument is not supported. The method will only return the nodes that match all the class names. In browsers that implement the method natively it will not be overwritten. Closes #8401 .
2007-06-19 20:59:14 +00:00
Thomas Fuchs
03ae9dd3ee
* Make document.getElementsByClassName match the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 ( http://www.whatwg.org/specs/web-apps/current-work/#getelementsbyclassname ). It now supports multiple class names given as an array or a space-separated list in a string. The method will only return the nodes that match all the class names. In browsers that implement the method natively it will not be overwritten. Closes #8401 . [Mislav Marohnic]
2007-06-17 22:26:46 +00:00
Thomas Fuchs
afbef44cd6
Prototype: save a few lines in Element.Methods.hasClassName
2007-06-17 22:14:07 +00:00
Thomas Fuchs
1b8ef5af86
Fix a Safari rendering issue when floating elements could temporarily disappear when opacity was set to 1. Closes #7063 . References #3044 , #3813 , #6706 . [Thomas Fuchs, davidjrice]
2007-06-17 18:13:37 +00:00
Sam Stephenson
ae2ea8a2e9
prototype: Ensure HTMLElement exists before creating Element.extend.
2007-06-09 01:51:26 +00:00
Thomas Fuchs
0c7bac17f0
Prototype: Make Element#absolutize and Element#relativize properly use Element#getStyle. Closes #8580 . [Christophe Porteneuve]
2007-06-06 14:30:01 +00:00
Thomas Fuchs
5f4bab4dcb
Prototype: Fix Element.insert for null values and numeric values when defaulting to bottom
2007-06-02 16:00:47 +00:00
Thomas Fuchs
d4d4fddc7c
Prototype: Change Element.insert syntax to allow multiple positions.
2007-06-02 15:08:50 +00:00
Thomas Fuchs
f099e670f5
Element.setOpacity now calls removeAttribute on the filter style on IE if no more filters remain, which makes Cleartype work properly. Closes #8376 .
2007-05-19 00:11:46 +00:00
Sam Stephenson
a8a19eb439
prototype: Minor cleanup of the position methods
2007-05-18 01:21:41 +00:00
Sam Stephenson
7d2ae294a9
prototype: Fix Element#clonePosition to call Element#viewportOffset. Closes #8372 .
2007-05-18 01:12:35 +00:00
Sam Stephenson
83b4b337e1
Merge -r6634:HEAD from ../branches/dom.
...
* 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. Closes #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. Closes #8010 , #7989 . [dsl239, Tobie Langel]
* Add Element#wrap which wraps the element inside a new one. Closes #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. Closes #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'. Closes #7907 . [Tobie Langel]
2007-05-12 05:01:56 +00:00
Sam Stephenson
67a4d00588
prototype: Refactor Element.extend and eliminate Element.extend.cache.
2007-05-12 04:32:30 +00:00
Sam Stephenson
562e61fc8c
prototype: Add Function#curry, Function#delay, Function#defer, and Function#wrap. Closes #8134 .
2007-04-29 05:37:07 +00:00
Sam Stephenson
b76d34e7bb
prototype: Fix regression in which no-argument calls to Element.addMethods() would not add the methods defined in Form.Methods and Form.Element.Methods. Closes #8206 .
2007-04-28 02:32:21 +00:00
Sam Stephenson
1886b03d60
prototype: Fix Element#readAttribute to work with the 'type' attribute in IE. Closes #8160 .
2007-04-28 02:23:26 +00:00
Sam Stephenson
47bfeb5083
prototype: Add Element#childElements as an alias for Element#immediateDescendants.
2007-04-24 06:17:59 +00:00
Sam Stephenson
5784d78f6e
prototype: Add Element#firstDescendant to retrieve the first non-text child node of an element. Optimize DOM navigation methods (Element#up, Element#down, Element#previous, Element#next) for no-argument calls. Closes #7848 .
2007-04-24 06:06:44 +00:00
Sam Stephenson
63342b9c01
prototype: Element.addMethods should add methods to Element as well as Element.Methods. Closes #7888 .
2007-04-24 05:23:41 +00:00
Thomas Fuchs
a0532bd933
Rolling back #7683 as it breaks existing effects in certain scenarios
2007-04-05 12:50:59 +00:00
Thomas Fuchs
930c8f2665
Fix an issue with Element.getDimensions with some element types on non IE-browsers. Closes #7683 . [Andrew Dupont]
2007-03-27 18:04:59 +00:00
Thomas Fuchs
e9501d63e5
Make Element.extend work on IE for Nodes with the same ID that where discarded.
2007-03-11 22:40:24 +00:00
Thomas Fuchs
881b7dc00f
Prototype: Fix Element.Methods.descendants() to properly extend elements on IE.
2007-03-11 10:59:06 +00:00
Sam Stephenson
811fb86286
prototype: 1.5.1_rc1: Fix readAttribute for IE7.
2007-03-09 19:17:50 +00:00
Sam Stephenson
fb0013a193
prototype: Give the parens some breathing room
2007-03-09 04:23:28 +00:00
Sam Stephenson
00bce412d2
prototype: Merge the selector branch into trunk, bringing vast performance improvements, bug fixes, and near-complete CSS3 compliance to $$ and Selector. Closes #7568 .
2007-03-09 04:12:13 +00:00
Thomas Fuchs
1bf16af3bc
We dont like tabs
2007-03-08 22:45:07 +00:00
Thomas Fuchs
752eebdd26
Prototype: Fix simulated attribute reading for IE for "href", "src" and boolean attributes.
2007-03-08 22:43:18 +00:00
Thomas Fuchs
fcc23f0d70
Optimize document.getElementsByClassName and finalize DOM performance optimization refactoring. Closes #6696
2007-03-04 22:55:08 +00:00