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

chore(IE8): remove all IE8 specific code #8837

Closed
wants to merge 1 commit into from

Conversation

lgalfaso
Copy link
Contributor

Remove all code that was IE8 specific

@@ -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");
Copy link
Contributor

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.

@mgol
Copy link
Member

mgol commented Sep 11, 2014

👍

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.");
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

netsurf!

Copy link
Contributor

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

Copy link
Contributor

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!

Copy link
Member

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. ;)

Copy link
Contributor

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();

Copy link
Contributor

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.

@lgalfaso lgalfaso closed this in e843ae7 Oct 7, 2014
bullgare pushed a commit to bullgare/angular.js that referenced this pull request Oct 9, 2014
Remove all code that was IE8 specific

Closes angular#8837
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants