src/modules/rangy-classapplier.js
function hasClass(el, className) {
        if (typeof el.classList == "object") {
            return el.classList.contains(className);
        } else {
            var classNameSupported = (typeof el.className == "string");
            var elClass = classNameSupported ? el.className : el.getAttribute("class");
            return classNameContainsClass(elClass, className);
        }
    }
function hasClass(el, className) {
        if (typeof el.classList == "object") {
            return el.classList.contains(className);
        } else {
            var classNameSupported = (typeof el.className == "string");
            var elClass = classNameSupported ? el.className : el.getAttribute("class");
            return classNameContainsClass(elClass, className);
        }
    }
function hasClass ( el , className ) { if ( typeof el . classList == "object" ) { return el . classList . contains ( className ) ; } else { var classNameSupported = ( typeof el . className == "string" ) ; var elClass = classNameSupported ? el . className : el . getAttribute ( "class" ) ; return classNameContainsClass ( elClass , className ) ; } }
Inefficient, inelegant nonsense for IE's svg element, which has no classList and non-HTML className implementation
Inefficient inelegant nonsense for IE s svg element which has no classList and non - HTML className implementation