style(*): IE is a real browser, and chakra is pretty solid
- IE9+ do not have issues with Function.prototype.apply() on builtin fns (asked Brian Terlson) (NOTE: there may still be corner cases where builtins will not have `apply()` --- 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
This commit is contained in:
+2
-2
@@ -155,8 +155,8 @@ if ('i' !== 'I'.toLowerCase()) {
|
||||
}
|
||||
|
||||
|
||||
var /** holds major version number for IE or NaN for real browsers */
|
||||
msie,
|
||||
var
|
||||
msie, // holds major version number for IE, or NaN if UA is not IE.
|
||||
jqLite, // delay binding since jQuery could be loaded after us.
|
||||
jQuery, // delay binding
|
||||
slice = [].slice,
|
||||
|
||||
@@ -40,7 +40,6 @@ var scriptDirective = ['$templateCache', function($templateCache) {
|
||||
compile: function(element, attr) {
|
||||
if (attr.type == 'text/ng-template') {
|
||||
var templateUrl = attr.id,
|
||||
// IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent
|
||||
text = element[0].text;
|
||||
|
||||
$templateCache.put(templateUrl, text);
|
||||
|
||||
+1
-1
@@ -762,7 +762,7 @@ Parser.prototype = {
|
||||
ensureSafeObject(context, parser.text);
|
||||
ensureSafeFunction(fnPtr, parser.text);
|
||||
|
||||
// IE stupidity! (IE doesn't have apply for some native functions)
|
||||
// IE doesn't have apply for some native functions
|
||||
var v = fnPtr.apply
|
||||
? fnPtr.apply(context, args)
|
||||
: fnPtr(args[0], args[1], args[2], args[3], args[4]);
|
||||
|
||||
Reference in New Issue
Block a user