How to use async and await in Extjs Extended Class methods constructor, initcomponent

122 views Asked by At
 initComponent: async function () {
        var me = this;
        const isPivotLoaded = Ext.Package.isLoaded('ckeditor');
        if (!isPivotLoaded) {
            var result = await Ext.Package.load('ckeditor').catch(function(error){console.log(error)});
            if (!result) {
                alert('Error loading package!');
                return;
            }
        }

Here i used package to download external files, but it wont wait until file downloaded, how to achieve it in extjs

0

There are 0 answers