B2G/gecko/browser/base/content/newtab/transformations.js
/**
   * Listens for the 'transitionend' event on a given node and calls the given
   * callback.
   * @param aNode The node that is transitioned.
   * @param aCallback The callback to call when finished.
   */
Listens for the 'transitionend' event on a given node and calls the given
callback.
@param aNode The node that is transitioned.
@param aCallback The callback to call when finished.
Listens for the ' transitionend ' event on a given node and calls the given callback . @param aNode The node that is transitioned . @param aCallback The callback to call when finished .
function Transformation_whenTransitionEnded(aNode, aCallback) {
    aNode.addEventListener("transitionend", function onEnd() {
      aNode.removeEventListener("transitionend", onEnd, false);
      aCallback();
    }, false);
  }
function Transformation_whenTransitionEnded ( aNode , aCallback ) { aNode . addEventListener ( "transitionend" , function onEnd ( ) { aNode . removeEventListener ( "transitionend" , onEnd , false ) ; aCallback ( ) ; } , false ) ; }
Listens for the 'transitionend' event on a given node and calls the given
 callback.
Listens for the ' transitionend ' event on a given node and calls the given callback .