* Converts the source to array object. Mostly used for function arguments and * lists returned by getElementsByTagName() which aren't Array objects. * @param {List} source Source list. * @return {Array} Returns array.
(source)
| 416 | * @return {Array} Returns array. |
| 417 | */ |
| 418 | function toArray(source) |
| 419 | { |
| 420 | var result = []; |
| 421 | |
| 422 | for (var i = 0; i < source.length; i++) |
| 423 | result.push(source[i]); |
| 424 | |
| 425 | return result; |
| 426 | }; |
| 427 | |
| 428 | /** |
| 429 | * Splits block of text into lines. |