Skip to content

Instantly share code, notes, and snippets.

@appden
Forked from fabiomcosta/gist:189825
Created September 20, 2009 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save appden/189828 to your computer and use it in GitHub Desktop.
Save appden/189828 to your computer and use it in GitHub Desktop.
Function.stab(function(){
Array.from(document.html.childNodes);
}, function(){
var old = Array.from;
Array.from = function(item, slice){
if (typeOf(item) == 'collection'){
var l = item.length, array = new Array(l - slice), i = slice;
while (i++ < l) array[i - slice] = item[i];
return array;
}
return old(item, slice);
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment