Preventing svg polyfill from interefering on frames rendering
This commit is contained in:
parent
f5af70a218
commit
8af73dc438
@ -1,12 +1,16 @@
|
|||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
|
import { $ } from 'meteor/jquery';
|
||||||
import writeScript from './lib/writeScript';
|
import writeScript from './lib/writeScript';
|
||||||
|
|
||||||
Meteor.startup(() => {
|
// Check if browser is IE and add the polyfill scripts
|
||||||
// Check if browser is IE and add the polyfill scripts
|
if (navigator && /MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
|
||||||
if (navigator && /MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
|
Meteor.startup(() => {
|
||||||
|
// This is needed before window loading because it's used to parse DICOM images data
|
||||||
writeScript('typedarray.min.js');
|
writeScript('typedarray.min.js');
|
||||||
|
|
||||||
// Fix SVG+USE issues by calling the SVG polyfill
|
$(window).on('load', () => {
|
||||||
writeScript('svg4everybody.min.js', () => window.svg4everybody());
|
// Fix SVG+USE issues by calling the SVG polyfill
|
||||||
}
|
writeScript('svg4everybody.min.js', () => window.svg4everybody());
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user