dojox/app/controllers/HistoryHash (version 1.10)

dojox/app/Controller

Usage

var foo = new HistoryHash(app);
dojox/app/controllers/HistoryHash
Parameter Type Description
app undefined

dojox/app application instance.

Method Summary

  • _addHistory(hash) Add hash to application history stack, update history management flags.
  • _back(currentHash,detail)
  • _forward(currentHash,detail)
  • _go(index,step)
  • bind(evented,event,handler) Bind event on dojo/Evented instance, document, domNode or window.
  • unbind(evented,event) remove a binded event signal.

Event Summary

Methods

_addHistory(hash)

Add hash to application history stack, update history management flags.

Parameter Type Description
hash undefined

new hash should be added to _historyStack.

_back(currentHash,detail)
Parameter Type Description
currentHash undefined
detail undefined
_forward(currentHash,detail)
Parameter Type Description
currentHash undefined
detail undefined
_go(index,step)
Parameter Type Description
index undefined
step undefined
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

_onHashChange(currentHash)

subscribe /dojo/hashchange and do add history, back, forward and go operation.

Parameter Type Description
currentHash undefined

the new url hash when /dojo/hashchange is triggered.

onDomNodeChange(evt)
Parameter Type Description
evt undefined
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!