-
Notifications
You must be signed in to change notification settings - Fork 27.4k
chore(IE8): remove all IE8 specific code #8837
Conversation
@@ -4,8 +4,7 @@ function createXhr(method) { | |||
//if IE and the method is not RFC2616 compliant, or if XMLHttpRequest | |||
//is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest | |||
//if it is available | |||
if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) || | |||
!window.XMLHttpRequest)) { | |||
if (!window.XMLHttpRequest) { | |||
return new window.ActiveXObject("Microsoft.XMLHTTP"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, the entire first condition needs to be removed.
👍 |
02dc2aa
to
fd2d6c0
Compare
Remove all code that was IE8 specific
|
||
throw minErr('$httpBackend')('noxhr', "This browser does not support XMLHttpRequest."); | ||
throw minErr('$httpBackend')('noxhr', "This browser does not support XMLHttpRequest."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tell me one browser that doesn't have XMLHttpRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
netsurf!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had to try it. Best browser ever!
Visited angularjs.org and got an alert error "Warning NetSurf is running out of memory. Please free some memory and try again." and closed itself! Don't even run any javascript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it's the best browser you can run on an Amiga!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tell me one browser that doesn't have XMLHttpRequest
IE (all versions) has an auto-destruct mode called (as a disguise) "Disable
native XMLHttpRequest". Only the ActiveX one remains available then.
With such a setting everything must be so broken, though, that I'm not sure
if this message adds any new info to such users. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO i say change
var xhr = createXhr(method);
// to
var xhr = new window.XMLHttpRequest();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would break any attempt at unit testing $httpBackend. See also #9300 for some discussion regarding this.
Remove all code that was IE8 specific Closes angular#8837
Remove all code that was IE8 specific