Sling.getXHR = function()

in src/main/resources/system/sling.js [393:428]


    Sling.getXHR = function () {
        var xhr=null;
        
        if(!xhr) {
            try {
                // built-in (firefox, recent Opera versions, etc)
                xhr=new XMLHttpRequest();
            } catch (e) {
                // ignore
            }
        }
        
        if(!xhr) {
            try {
                // IE, newer versions
                xhr=new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                // ignore
            }
        }
        
        if(!xhr) {
            try {
                // IE, older versions
                xhr=new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {
                // ignore
            }
        }
        
        if(!xhr) {
            alert("Unable to access XMLHttpRequest object, sling will not work!");
        }
        
        return xhr;
    }