Is it safe to use this function?



  • Hello.

    My App is using this javascript functions.

    
    window.fn.pushPage = function (page, anim, clearcache = false) {
        document.getElementById('sidemenu').close();
        if (clearcache) {
            ons._internal.templateStore.set(page.id, null);
        }
        if (anim) {
            document.getElementById('appNavigator').pushPage(page.id, { data: { title: page.title }, animation: anim });
        } else {
            document.getElementById('appNavigator').pushPage(page.id, { data: { title: page.title } });
        }
    };
    
    
    window.fn.resetPageCache = function () {
        ons._internal.templateStore._storage = {};
    }
    
    

    Is it safe to use? Please advise me if there is another suitable method.
    Thanks!


Log in to reply