-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why are the modules not return in the callback? #4
Comments
That would probably be ok but you can also add things onto the
Then in your plugin:
|
yes but i am trying to do a crossplatform social network manager, so i need access to a plugin for example to post. |
Can you give a little code snippet with what you want to do with it? |
yes of course, first of course i will load the plugins and keep a reference to the collection view.document.addEventListener('DOMContentLoaded', function () {
plugins.load(context, (err, ids, plugins) => {
if(err)
return;
this.pluginsHolder = plugins;
});
}); each plugin contains a social network, each of the plugins export a class with the same signature. So i can do something like: function postData()
{
for (var i = 0; i < this.pluginsHolder.lenght; ++i) {
this.pluginsHolder[i].post('Hello World');
}
} |
Oh ok! I'm glad you provided that snippet. You're just saying that you want the e.g. callback(null, dependencies, modules) That would be pretty easy and backward compatible if you say yes I can publish this change pretty fast. |
yes that us exactly what i was thinking about :). if you publish that change it will be really helpful for me. |
Published in v0.1.0 |
thanks a lot :) |
so i have my use case where i need to call some functions common to my modules during execution. I am finding that this seems not actually possible as in the callback the return values are a list of the 'dependencies'.
is there any why the modules collection should not be returned in the callback?
The text was updated successfully, but these errors were encountered: