Skip to content
Snippets Groups Projects
Commit 4c52a554 authored by khawkins98's avatar khawkins98
Browse files

Thwart old versions of IE

parent 28ae521e
No related branches found
No related tags found
No related merge requests found
/**
* Utility method to get if it is IE, and what integer version.
* via: https://stackoverflow.com/a/15983064
* @returns {int} the IE version number
* @example if (isIE () && isIE () < 9) { }
*/
function isIE () {
var myNav = navigator.userAgent.toLowerCase();
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
}
/**
* Utility function to toggle classes. Chiefly to show the #embl-bar.
*/
......
......@@ -21,6 +21,8 @@ function ebiFrameworkInvokeScripts() {
document.addEventListener("DOMContentLoaded", function(event) {
var bodyData = document.body.dataset;
// document.body.dataset not supported in < ie10
if (isIE () && isIE () < 10) { bodyData = []; }
if (bodyData["ebiframeworkinvokescripts"] != "false") {
ebiFrameworkInvokeScripts();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment