UNPKG

dojox

Version:

Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.

29 lines (25 loc) 1.03 kB
define(["dojo/_base/declare", "dojo/on"], function(declare, on){ return declare("dojox.mobile.TransitionEvent", null, { // summary: // A class used to trigger view transitions. constructor: function(/*DomNode*/target, /*Object*/transitionOptions, /*Event?*/triggerEvent){ // summary: // Creates a transition event. // target: // The DOM node that initiates the transition (for example a ListItem). // transitionOptions: // Contains the transition options. // triggerEvent: // The event that triggered the transition (for example a touch event on a ListItem). this.transitionOptions = transitionOptions; this.target = target; this.triggerEvent = triggerEvent||null; }, dispatch: function(){ // summary: // Dispatches this transition event. Emits a "startTransition" event on the target. var opts = {bubbles:true, cancelable:true, detail: this.transitionOptions, triggerEvent: this.triggerEvent}; var evt = on.emit(this.target,"startTransition", opts); } }); });