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

refactor($http) Simplify code by removing the createXhr() method #9300

Closed
wants to merge 1 commit into from

Conversation

realityking
Copy link
Contributor

This removes a workaround for IE 8 and and error handling for IE6. This is basically a revert of 6c17d02.

Saves 202 bytes on the minified build.

@realityking realityking force-pushed the xhr branch 2 times, most recently from 3acad64 to e2ce50e Compare September 26, 2014 15:08
@realityking realityking force-pushed the xhr branch 2 times, most recently from f227e4d to 7f54aa5 Compare September 26, 2014 15:23
@caitp
Copy link
Contributor

caitp commented Sep 26, 2014

I don't totally like this, I think it would be better for $httpBackend to continue using a factory to create the XHR rather than an actual constructor.

In addition to this, even though it's true that we don't want to support IE8, there are situations where people want to customize the way an XHR is constructed (such as for B2G/gaia), and I think the current state of the tree is closer to making that work than this change would be.

Why not just change it to

function createXhr() {
  return new XMLHttpRequest();
}

instead?

@realityking
Copy link
Contributor Author

Updated with the requested change.

…ons of Internet Explorer

This removes a workaround for IE 8 and and error handling for IE6.
IgorMinar pushed a commit to IgorMinar/angular.js that referenced this pull request Oct 6, 2014
…ons of Internet Explorer

This removes a workaround for IE 8 and and error handling for IE6.

Closes angular#9300
@IgorMinar IgorMinar closed this in f52203c Oct 6, 2014
@vitaly-t
Copy link

vitaly-t commented Oct 7, 2014

Good sweep, nice and clean, keep at it! ;)

@realityking realityking deleted the xhr branch October 7, 2014 19:35
bullgare pushed a commit to bullgare/angular.js that referenced this pull request Oct 9, 2014
…ons of Internet Explorer

This removes a workaround for IE 8 and and error handling for IE6.

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

Successfully merging this pull request may close these issues.

4 participants