/ Published in: JavaScript
Some HTMLCollection objects such as returned from document.getElementsByTagName() look like arrays but are not. You will need to run the object through slice.call() to convert to an actual array.
This function will convert array like objects into a real array. IE does not support slice.call(). The try-catch will genereate an exception and convert object to an array with a loop for IE.
This function will convert array like objects into a real array. IE does not support slice.call(). The try-catch will genereate an exception and convert object to an array with a loop for IE.