domino.js icon indicating copy to clipboard operation
domino.js copied to clipboard

More classic asynchronous workflow potentiel

Open jacomyal opened this issue 11 years ago • 0 comments

In a project I'm currently working on, I must load dynamically assets from my modules, and it's pretty painful, right now.

These assets cannot be referenced independantly in my domino controler, so since they are all lists, the property "lists" represents them:

  1. In my module constructor, I cannot dispatch event, since the events bindings are not done yet.
  2. Let's say I can dispatch my event (with some dirty setTimeout, for instance). So, I now when some assets are loaded (through the "listsUpdated" event), but I am not sure yet that this is actually the piece I need. Indeed, some other modules created at the same time might have asked for some other assets, right?

So, basically, what I suggest here is that for this kind of cases precisely, I would definitely enjoy to use a more classic, callback-based syntax to communicate from the module...

jacomyal avatar Jun 17 '13 15:06 jacomyal