Ember.run.join()

join (target, method, args*) Objectpublic

Defined in packages/ember-metal/lib/run_loop.js:82

If no run-loop is present, it creates a new one. If a run loop is present it will queue itself to run on the existing run-loops action queue.

Please note: This is not for normal usage, and should be used sparingly.

If invoked when not within a run loop:

run.join(function() {
  // creates a new run-loop
});

Alternatively, if called within an existing run loop:

run(function() {
  // creates a new run-loop
  run.join(function() {
    // joins with the existing run-loop, and queues for invocation on
    // the existing run-loops action queue.
  });
});

Parameters:

target [Object]
target of method to call
method Function|String
Method to invoke. May be a function or a string. If you pass a string then it will be looked up on the passed target.
args* [Object]
Any additional arguments you wish to pass to the method.

Returns:

Object
Return value from invoking the passed function. Please note, when called within an existing loop, no return value is possible.
doc_EmberJs
2016-11-30 16:51:40
Comments
Leave a Comment

Please login to continue.