ie-class-fixer.js 551 B

1234567891011121314151617181920
  1. /**
  2. * Copyright © Magento, Inc. All rights reserved.
  3. * See COPYING.txt for license details.
  4. */
  5. /* eslint-disable strict */
  6. (function () {
  7. var userAgent = navigator.userAgent, // user agent identifier
  8. html = document.documentElement, // html tag
  9. gap = ''; // gap between classes
  10. if (html.className) { // check if neighbour class exist in html tag
  11. gap = ' ';
  12. } // end if
  13. if (userAgent.match(/Trident.*rv[ :]*11\./)) { // Special case for IE11
  14. html.className += gap + 'ie11';
  15. } // end if
  16. })();