From bac6b7fe6438d06fab3451263d4d94e9055f6f88 Mon Sep 17 00:00:00 2001 From: "john.j.camilleri" Date: Thu, 22 Nov 2012 12:45:20 +0000 Subject: Syntax editor: can now load minibar (in-place) from a linearised tree --- src/www/js/support.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/www/js') diff --git a/src/www/js/support.js b/src/www/js/support.js index 9687ea8a1..41b736855 100644 --- a/src/www/js/support.js +++ b/src/www/js/support.js @@ -20,6 +20,15 @@ if(!Array.isArray) { }; } +// Create a clone of an array +// http://davidwalsh.name/javascript-clone-array +// Note that iterating over an array with for...in will include "clone" as a key! +// if(!Array.clone) { +// Array.prototype.clone = function() { +// return this.slice(0); +// }; +// } + /* --- JSONP ---------------------------------------------------------------- */ // Inspired by the function jsonp from -- cgit v1.2.3