ohif-viewer/Packages/ohif-polyfill/client/ie.js
2017-11-23 20:07:14 -02:00

14 lines
436 B
JavaScript

import { Meteor } from 'meteor/meteor';
import { $ } from 'meteor/jquery';
import writeScript from './lib/writeScript';
// Check if browser is IE and add the polyfill scripts
if (navigator && /MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
Meteor.startup(() => {
$(window).on('load', () => {
// Fix SVG+USE issues by calling the SVG polyfill
writeScript('svgxuse.min.js');
});
});
}