Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 8f05ca5

Browse files
committed
style(*): IE is a real browser, and chakra is pretty solid
- IE9+ do not have issues with Function.prototype.bind() on builtin fns (asked Brian Terlson) (NOTE: there may still be corner cases where builtins will not have `bind()` --- this may need to be reverted on complaint). - HTMLScriptElement#text is an IDL-spec'd attribute, and we use it in all cases --- so the comment was sort of nonsense. - The value of `msie` does not depend on whether the user is using a "real" browser or not. Closes #10242
1 parent 2ec8d1f commit 8f05ca5

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/Angular.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ if ('i' !== 'I'.toLowerCase()) {
162162
}
163163

164164

165-
var /** holds major version number for IE or NaN for real browsers */
166-
msie,
165+
var
166+
msie, // holds major version number for IE, or NaN if UA is not IE.
167167
jqLite, // delay binding since jQuery could be loaded after us.
168168
jQuery, // delay binding
169169
slice = [].slice,

src/ng/directive/script.js

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ var scriptDirective = ['$templateCache', function($templateCache) {
4040
compile: function(element, attr) {
4141
if (attr.type == 'text/ng-template') {
4242
var templateUrl = attr.id,
43-
// IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent
4443
text = element[0].text;
4544

4645
$templateCache.put(templateUrl, text);

src/ng/parse.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -722,12 +722,7 @@ Parser.prototype = {
722722
ensureSafeObject(context, expressionText);
723723
ensureSafeFunction(fn, expressionText);
724724

725-
// IE stupidity! (IE doesn't have apply for some native functions)
726-
var v = fn.apply
727-
? fn.apply(context, args)
728-
: fn(args[0], args[1], args[2], args[3], args[4]);
729-
730-
return ensureSafeObject(v, expressionText);
725+
return ensureSafeObject(fn.apply(context, args), expressionText);
731726
};
732727
},
733728

0 commit comments

Comments
 (0)