Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
infragistics.loder.js - Dublicate append of tags
posted

Hi,

i am working on a ASP.NET MVC Single Page Application and i am using jQuery iggrid control. So i have noticed that if i use the following approach to create the grid:

$.ig.loader('igGrid.*', function () {

    if ($('selector').data("igGrid") === undefined) {

        $('grid selector').igGrid(gridOptions);

    }

});

the css <link> elements are appended at the bottom of the <head> tag, so everything works fine so far. But if i delete and then create again a new grid without refreshing the page(as i said previously this is a Single Page Application), then these css <link> elements are appended again in the <head> and each time when i create a new grid this happens again. So i looked in the infragistics.loader.js file and i noticed that in this function:

    isLoadedCss: function (a) {
        return (a && a.length > 0 ? this._isLoadedHeadElem(a.substring(a.lastIndexOf("/")), "link") : false)
    },

the second parameter of this._isLoadedHeadElem, "link" should be uppercase, when i change this, the condition in this function:

    _isLoadedHeadElem: function (f, g) {
        var b = document.documentElement,
            c, d = b.childNodes.length,
            a, e;
        if (b.nodeName !== "HEAD") {
            for (c = 0; c < d; c++) {
                if (b.childNodes[c].nodeName === "HEAD") {
                    b = b.childNodes[c];
                    break
                }
            }
            d = b.childNodes.length
        }
        for (c = 0; c < d; c++) {
            a = b.childNodes[c];
            if (g === "LINK") {
                e = a.href
            } else {
                if (g === "SCRIPT") {
                    e = a.src
                }
            }
            if (e && a.nodeName === g && e.lastIndexOf(f) !== -1) {
                return true
            }
        }
        return false
    },

works as it is expected and the DOM Pollution that i described above no longer appers. Could you please confirm that this is issue in the loader js file and that it will be fixed in the next releases?

Parents
No Data
Reply
  • 37874
    posted

    Hello,

    I have created a support case on your behalf with number CAS-108176-B6J0W6. You can find your active cases under Account - Support Activity in our website. Select your ticket and go to Development Issues tab to view the status of related bugs.

    Let me know if you have any further questions.

Children
No Data