Deferred

helpers. Deferred

new Deferred()

Description:
  • Polyfill for jQuery Deferred From https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred

Source:

Members

promise :Promise

Description:
  • A newly created Promise object. Initially in pending state.

Source:

A newly created Promise object. Initially in pending state.

Type:
  • Promise

Methods

reject(reason)

Description:
  • A method to reject the associated Promise with the value passed. If the promise is already settled it does nothing.

Source:
Parameters:
Name Type Description
reason *

The reason for the rejection of the Promise. Generally its an Error object. If however a Promise is passed, then the Promise itself will be the reason for rejection no matter the state of the Promise.

resolve(value)

Description:
  • A method to resolve the associate Promise with the value passed.

Source:
Parameters:
Name Type Description
value *

the value to resolve the promise with