-
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.
- Loading branch information
1 parent
4e42ae4
commit 3e25189
Showing
2 changed files
with
8 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
define(function() { | ||
var createElement = function() { | ||
if (typeof document.createElement !== 'function') { | ||
var oldCreateElement = document.createElement; | ||
document.createElement = function (tagName) { | ||
return oldCreateElement(tagName); | ||
}; | ||
// This is the case in IE7, where the type of createElement is "object". | ||
// For this reason, we cannot call apply() as Object is not a Function. | ||
return document.createElement(arguments[0]); | ||
} else { | ||
return document.createElement.apply(document, arguments); | ||
} | ||
return document.createElement.apply(document, arguments); | ||
}; | ||
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