-
Notifications
You must be signed in to change notification settings - Fork 5
Supporting IE9
JP DeVries edited this page May 23, 2015
·
1 revision
Eureka doesn't technically support IE9, but with a little hacking we can achieve basic IE9 support. It isn't pretty, but who cares.
You'll need to:
- include the dom4 polyfill
- include
eureka.no-flexbox.css
The polyfill will fix the JavaScript support and the eureka.no-flexbox.css
stylesheet will mimic the flexible layout in a lame but usable way.
Of course, you should only be serving the polyfill and eureka.no-flexbox.css
stylesheet to IE9 or below.
try { // only loads dom4.js if needed
document.createElement('div').classList.add('foo')
} catch(e) {
document.write('<script src="' + 'js/vendor/dom4.js' + '"><\/script>');
}
// requires modernizr.js
// only loads the no-flexbox shiv if needed
if(Modernizr !== undefined && Modernizr.flexbox == false) {
link = document.createElement("link");
link.href = 'css/eureka.no-flexbox.0.0.0.min.css';
link.type = "text/css";
link.rel = "stylesheet";
link.media = "screen";
document.getElementsByTagName("head")[0].appendChild(link);
}