summaryrefslogtreecommitdiffstats
path: root/core/js/compatibility.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/compatibility.js')
-rw-r--r--core/js/compatibility.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/js/compatibility.js b/core/js/compatibility.js
index 3e9178f3200..0cfeefab871 100644
--- a/core/js/compatibility.js
+++ b/core/js/compatibility.js
@@ -23,3 +23,10 @@ if (!Function.prototype.bind) {
return fBound;
};
}
+
+//https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim
+if(!String.prototype.trim) {
+ String.prototype.trim = function () {
+ return this.replace(/^\s+|\s+$/g,'');
+ };
+} \ No newline at end of file