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

style(*): IE is a real browser, and chakra is pretty solid #10242

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,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,
Expand Down
1 change: 0 additions & 1 deletion src/ng/directive/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment does not make sense, since text is IDL-exposed for HTMLScriptElement, and we're using it in all cases anyways.


$templateCache.put(templateUrl, text);
Expand Down
1 change: 0 additions & 1 deletion src/ng/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,6 @@ Parser.prototype = {
ensureSafeObject(context, expressionText);
ensureSafeFunction(fn, expressionText);

// IE stupidity! (IE doesn't have apply for some native functions)
var v = fn.apply
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've asked if this is still factual, if it's not true of IE9 we can probably just delete this (yay!)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have a box with IE, but it looks like it is still an issue. E.g. console.log.apply(console, ['foo']);

Anyhow, please keep a IE specific comment so the workaround can be removed when we stop supporting IE9

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loading up IE

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log cannot be applyed in IE9 on Win7. We should keep the comment but remove the "stupid" bit.

? fn.apply(context, args)
: fn(args[0], args[1], args[2], args[3], args[4]);
Expand Down