-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making sure files only leak a single variable when we strip the wrapp…
…ers. aka Hax.
- Loading branch information
Showing
6 changed files
with
20 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
define(['fnBind'], function() { | ||
var createElement = document.createElement; | ||
return createElement.bind(document); | ||
var createElement = document.createElement.bind(document); | ||
return createElement; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
define(['is'], function( is ) { | ||
// hasOwnProperty shim by kangax needed for Safari 2.0 support | ||
var _hasOwnProperty = ({}).hasOwnProperty; | ||
var hasOwnProp; | ||
|
||
if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { | ||
hasOwnProp = function (object, property) { | ||
return _hasOwnProperty.call(object, property); | ||
}; | ||
} | ||
else { | ||
hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ | ||
return ((property in object) && is(object.constructor.prototype[property], 'undefined')); | ||
}; | ||
} | ||
(function() { | ||
var _hasOwnProperty = ({}).hasOwnProperty; | ||
if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { | ||
hasOwnProp = function (object, property) { | ||
return _hasOwnProperty.call(object, property); | ||
}; | ||
} | ||
else { | ||
hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ | ||
return ((property in object) && is(object.constructor.prototype[property], 'undefined')); | ||
}; | ||
} | ||
})(); | ||
|
||
return hasOwnProp; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters