git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
da26d0e
)
Switch to using String.prototype.trim from String.trim as it's more-widely available.
author
jeresig
<jeresig@gmail.com>
Thu, 11 Mar 2010 15:49:19 +0000
(10:49 -0500)
committer
jeresig
<jeresig@gmail.com>
Thu, 11 Mar 2010 15:49:19 +0000
(10:49 -0500)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
3f156a5
..
699b87a
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-53,6
+53,7
@@
var jQuery = function( selector, context ) {
hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
+ trim = String.prototype.trim,
indexOf = Array.prototype.indexOf;
jQuery.fn = jQuery.prototype = {
indexOf = Array.prototype.indexOf;
jQuery.fn = jQuery.prototype = {
@@
-569,11
+570,11
@@
jQuery.extend({
},
// Use native String.trim function wherever possible
},
// Use native String.trim function wherever possible
- trim: String.trim ?
+ trim: trim ?
function( text ) {
return text == null ?
"" :
function( text ) {
return text == null ?
"" :
- String.trim( text );
+ trim.call( text );
} :
// Otherwise use our own trimming functionality
} :
// Otherwise use our own trimming functionality