You should be able to do something like:
var MyApp = {};
MyApp.Core = function(){ return {
init: function(MyAppConfig) {
console.log(MyAppConfig);
},
prepareTabpanels: function(tabpanels) {
}
}
}();
var MyAppConfig = {
"tabpanels":{"ids":["navigation"]}
};
YUI().use('node', 'event', function(Y){
Y.on('domready', MyApp.Core.init, this, MyAppConfig);
});
Please note that the event is not passed as the first parameter, this is a config.
Y.on takes parameters such as <event_type>
, <callback_function>
, <context>
, <params>
..
any parameter after the third element is passed to the callback function, so MyAppConfig becomes the first parameter in your init.
. API YUI3: http://developer.yahoo.com/yui/3/api/YUI.html#method_on