Skip to content

is it possible to return an deferred from function called by window.$deferRun ?  #5

@lgersman

Description

@lgersman

an example :

i have library file containing

window.$deferRun(
function( $, options) {
      function A_processed() { 
          // ...
      }
      function B_processed() { 
          // ...
      }
           // here is the important point(!) : 
           // returning an deferred has no effect right now
      return $.when( A_processed(), b_processed());
},
{
        depends : [ 'ampere_core', 'ampere_util', 'ampere_module', 'ampere_action', 'ampere_history', 'ampere_state', 'ampere_transition', 'ampere_view', 'ampere_theme']
});

i want my library to be resolved

  • when its dependences are resolved (works fine)
  • its function was executed (works fine)
  • the returned deferred are resolved (does not work right now)

i did not find a way to return a deferred from my library function which is taken into account for its "resolved" state.
any idea how to do this ?

kind regards,

lars

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions