summaryrefslogtreecommitdiff
path: root/src/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/www/js')
-rw-r--r--src/www/js/support.js9
1 files changed, 9 insertions, 0 deletions
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