From 7a2ee5ad183c77728724a3656644e4949b80112c Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Sat, 10 Sep 2011 13:33:10 -0400 Subject: [PATCH] ie compatibility: can't treat childNodes as a normal collection with slice. --- web-world/js-impl.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web-world/js-impl.js b/web-world/js-impl.js index 42292af..3176b9f 100644 --- a/web-world/js-impl.js +++ b/web-world/js-impl.js @@ -44,7 +44,12 @@ var domOpenF = // To go down, just take the children. function(n) { - return [].slice.call(n.childNodes, 0); + var i; + var result = []; + for (i = 0; i < n.childNodes.length; i++) { + result.push(n.childNodes[i]); + } + return result; }; var domCloseF = // To go back up, take the node, do a shallow cloning, and replace the children.