request.onreadystatechange = function()

in src/validationHelper.ts [34:47]


    request.onreadystatechange = function () {
        if (request.readyState !== this.HEADERS_RECEIVED) {
            return;
        }

        let contentType = request.getResponseHeader("Content-Type"),
            supportedTypes = ["image/png", "image/jpeg", "image/gif", "image/svg+xml"];

        if (supportedTypes.indexOf(contentType) > -1) {
            return imageCheckResultCallBack(true, contentType);
        }

        return imageCheckResultCallBack(false, contentType);
    };