Browse Source

adding prototype trim as fallback for IE8

remotes/origin/stable5
Thomas Mueller 14 years ago
parent
commit
e643742eb3
  1. 7
      core/js/compatibility.js

7
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,'');
};
}
Loading…
Cancel
Save