Fix "function $A" declaration inside of a conditional (confuses IE). Fixes #10882. [Jacco, Andrew Dupont]

This commit is contained in:
Andrew Dupont 2008-01-22 23:36:47 +00:00
parent c67fe0b2f3
commit c200c27f48
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
*SVN*
* Fix "function $A" declaration inside of a conditional (confuses IE). Fixes #10882. [Jacco, Andrew Dupont]
* Fixed selector parsing so that "#foo [bar=baz]" is treated the same way as "#foo *[bar=baz]". Closes #10734. [jlukas, kangax, Andrew Dupont]
* Fix Element#descendantOf logic in IE. Closes #10413. [martymix, kamil.szot]

View File

@ -7,14 +7,14 @@ function $A(iterable) {
}
if (Prototype.Browser.WebKit) {
function $A(iterable) {
$A = function(iterable) {
if (!iterable) return [];
if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') &&
iterable.toArray) return iterable.toArray();
var length = iterable.length || 0, results = new Array(length);
while (length--) results[length] = iterable[length];
return results;
}
};
}
Array.from = $A;