adding prototype trim as fallback for IE8
This commit is contained in:
parent
8065c73339
commit
e643742eb3
|
@ -23,3 +23,10 @@ if (!Function.prototype.bind) {
|
||||||
return fBound;
|
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…
Reference in New Issue