Fire event after AppConfig.getKeys()


I am more or less new with app development and I suppose my question is more related to not full understanding of JS.

I am getting AppConfig Keys by using following code and want to fire an action, e.g. an alert if the data is loaded. When I use .done(function(){alert(‘Data loaded’);} I get the error OC.AppConfig.getKeys() is undefined.

    OC.AppConfig.getKeys('owncollab_gantt', function(data){
         OCGantt.appConfig = data;

What am I doing wrong?