XmlAspect.org/Xml4jQuery/api/$then

From ApiFusion
Jump to: navigation, search
  1. $.$then().xmlTransform(xmlUrl,xslUrl,el)
    
  2. $(el).$then().hide()
    

Creates the promise, invokes callback and resolves the promise.

Arguments

  1. callback /* invoked before the chain continues. Optional. */
    
  2. errback /* invoked when previous Promise is rejected( error in the chain). Optional. 
    If present the error is not propagated further and the return value used as result for current chain action. */
    


  1. string /* used as action result after filling $0, $1, ... from executed in the action chain results. Optional. */
    
 $.sleep(10)
.$then( "+$0"   ) // +10
.$then( "$0-$1") // +10-10
.$then( ( a, b, c )=>console.log(a,b,c) ); // +10-10, +10, 10
  1. any non-string or function used as action result

Return

The promises chain shimmed the jQuery and Xml4jQuery methods.

Notes

Callback arguments also same as in $then().