Functiondojo.back.addToHistory

dojo.require("dojo.back");
defined in dojo/back.js

To support getting back button notifications, the object argument should implement a function called either "back", "backButton", or "handle". The string "back" will be passed as the first and only argument to this callback.

To support getting forward button notifications, the object argument should implement a function called either "forward", "forwardButton", or "handle". The string "forward" will be passed as the first and only argument to this callback.

If you want the browser location string to change, define "changeUrl" on the object. If the value of "changeUrl" is true, then a unique number will be appended to the URL as a fragment identifier (http://some.domain.com/path#uniquenumber). If it is any other value that does not evaluate to false, that value will be used as the fragment identifier. For example, if changeUrl: 'page1', then the URL will look like: http://some.domain.com/path#page1

Usage

function (/*dojo.__backArgs*/ args) (view source)
parametertypedescription
argsdojo.__backArgs 

Examples

Example 1

dojo.back.addToHistory({
    back: function(){ console.debug('back pressed'); },
    forward: function(){ console.debug('forward pressed'); },
    changeUrl: true
});