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

IE8 function createXhr(method) returns window.XMLHttpRequest(), is undefined #5677

@jorgt

Description

@jorgt
function createXhr(method) {
  // IE8 doesn't support PATCH method, but the ActiveX object does
  /* global ActiveXObject */
  return (msie <= 8 && lowercase(method) === 'patch')
      ? new ActiveXObject('Microsoft.XMLHTTP')
      : new window.XMLHttpRequest();
}

in IE8 on GET (and other) requests this returns a new window.XMLHttpRequest() which at least in my case throws a "typeerror: object expected" exception. Shouldn't this always return the ActiveXObject where < IE8 is concerned?

angularhttprequest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions