You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
396 B

7 years ago
  1. /**
  2. * Module exports.
  3. *
  4. * Logic borrowed from Modernizr:
  5. *
  6. * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js
  7. */
  8. try {
  9. module.exports = typeof XMLHttpRequest !== 'undefined' &&
  10. 'withCredentials' in new XMLHttpRequest();
  11. } catch (err) {
  12. // if XMLHttp support is disabled in IE then it will throw
  13. // when trying to create
  14. module.exports = false;
  15. }