dojox/app/controllers/History (version 1.10)

dojox/app/Controller

Usage

var foo = new History();
dojox/app/controllers/History

See the dojox/app/controllers/History reference documentation for more information.

Property Summary

  • _currentPositionPersistent variable which indicates the current position/index in the history (so as to be able to figure out whether the popState event was triggerd by a backward or forward action).
  • currentStateCurrent state

Method Summary

  • bind(evented,event,handler) Bind event on dojo/Evented instance, document, domNode or window.
  • unbind(evented,event) remove a binded event signal.

Event Summary

Properties

_currentPosition

Persistent variable which indicates the current position/index in the history (so as to be able to figure out whether the popState event was triggerd by a backward or forward action).

currentState

Current state

Methods

bind(evented,event,handler)

Bind event on dojo/Evented instance, document, domNode or window. Save event signal in controller instance. If no parameter is provided automatically bind all events registered in controller events property.

Parameter Type Description
evented Object

dojo/Evented instance, document, domNode or window

event String

event

handler Function

event handler

Returns:function

Bind event on dojo/Evented instance, document, domNode or window. Save event signal in controller instance. If no parameter is provided automatically bind all events registered in controller events property.

unbind(evented,event)

remove a binded event signal.

Parameter Type Description
evented Object

dojo/Evented instance, document, domNode or window

event String

event

Returns:function

remove a binded event signal.

Events

onDomNodeChange(evt)
Parameter Type Description
evt undefined
onPopState(evt)

Response to dojox/app "popstate" event.

Parameter Type Description
evt Object

Transition options parameter

onStartTransition(evt)

Response to dojox/app "startTransition" event.

Parameter Type Description
evt Object

Transition options parameter

Examples

Example 1

Use "dojox/mobile/TransitionEvent" to trigger "startTransition" event, and this function will response the event. For example:

var transOpts = {
    title:"List",
    target:"items,list",
    url: "#items,list",
    params: {"param1":"p1value"}
};
new TransitionEvent(domNode, transOpts, e).dispatch();
Error in the documentation? Can’t find what you are looking for? Let us know!