Make Element.extend work on IE for Nodes with the same ID that where discarded.

This commit is contained in:
Thomas Fuchs 2007-03-11 22:40:24 +00:00
parent d03e70c4d1
commit e9501d63e5
3 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,7 @@
*SVN*
* Make Element.extend work on IE for Nodes with the same ID that where discarded. [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]

View File

@ -63,7 +63,7 @@ Element.extend = function(element) {
element[property] = cache.findOrStore(value);
}
element._extended = true;
element._extended = Prototype.emptyFunction;
return element;
};

View File

@ -153,6 +153,8 @@
<div id="element_extend_test"> </div>
<div id="element_reextend_test"><div id="discard_1"></div></div>
<div id="test_whitespace"> <span> </span>
@ -607,6 +609,12 @@
});
}},
testElementExtendReextendsDiscardedNodes: function() {with(this) {
assertRespondsTo('show', $('discard_1'));
$('element_reextend_test').innerHTML += '<div id="discard_2"></div>';
assertRespondsTo('show', $('discard_1'));
}},
testElementCleanWhitespace: function() {with(this) {
Element.cleanWhitespace("test_whitespace");
assertEqual(3, $("test_whitespace").childNodes.length);