balupton/history.js — Issue #114: getState() should return the current state?
Author: tapioko
Created: 2011-10-18 10:53:15+00:00
State: open

If I understand the documentation correctly, History.getState() should return the current state, i.e. the state of the current history entry. In other words, if the state is pushed on page A and then user goes to page B by clicking a normal link, history length is increased by one and getState() should return null. If the user goes back and getState() is called, the previously pushed state should be returned.

Maybe there could be a boolean parameter to getState(), which indicates do we want the current state or the last saved state.