[Found workaround. Bug?] IE11 missing polyfills for q-layout?



  • I am trying to get q-layout working in IE11 UMD but I get a bunch of errors unless I put this code in my page. Is this a bug in Quasar’s IE11 support?:

    // IE11 polyfill
        //NodeList.prototype.remove = HTMLCollection.prototype.remove =
        if (!HTMLDivElement.prototype.remove) {
            HTMLDivElement.prototype.remove = function () {
                for (var i = this.length - 1; i >= 0; i--) {
                    if (this[i] && this[i].parentElement) {
                        this[i].parentElement.removeChild(this[i]);
                    }
                }
            }
        }
        if (!HTMLDivElement.prototype.closest) {
            HTMLDivElement.prototype.closest = function (s) {
                var el = this;
    
                do {
                    if (el.matches(s)) return el;
                    el = el.parentElement || el.parentNode;
                } while (el !== null && el.nodeType === 1);
                return null;
            };
        }
    
        if (!HTMLDivElement.prototype.matches) {
            HTMLDivElement.prototype.matches = HTMLDivElement.prototype.msMatchesSelector ||
                HTMLDivElement.prototype.webkitMatchesSelector;
        }
        if (!HTMLBodyElement.prototype.matches) {
            HTMLBodyElement.prototype.matches = HTMLBodyElement.prototype.msMatchesSelector ||
                HTMLBodyElement.prototype.webkitMatchesSelector;
        }
        if (!HTMLHtmlElement.prototype.matches) {
            HTMLHtmlElement.prototype.matches = HTMLHtmlElement.prototype.msMatchesSelector ||
                HTMLHtmlElement.prototype.webkitMatchesSelector;
        }
    

Log in to reply