has-cors.js 422 B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.hasCORS = void 0;
  4. // imported from https://github.com/component/has-cors
  5. let value = false;
  6. try {
  7. value = typeof XMLHttpRequest !== 'undefined' &&
  8. 'withCredentials' in new XMLHttpRequest();
  9. }
  10. catch (err) {
  11. // if XMLHttp support is disabled in IE then it will throw
  12. // when trying to create
  13. }
  14. exports.hasCORS = value;