This is a good start, but then it stops working under other browsers (i.e. firefox, chrome). Instead, you should add a check for IE 8 at the beginning of each function (ElementExtensions, SpecificElementExtensions, checkDeficiency), then return false for the anonymous Extensions functions and return true for the checkDeficiency function.
ElementExtensions: (function() { if (isIE8) return false; ... SpecificElementExtensions: (function() { if (isIE8) return false; ... function checkDeficiency(tagName) { if (isIE8) return true; ... var isIE8 = (function(){ return ((navigator.userAgent.indexOf('MSIE')!=-1) && (document.documentMode==8)); })();
Nicolas dextraze
source share