devote / HTML5-History-API

HTML5 History API expansion for browsers not supporting pushState, replaceState
http://spb-piksel.ru
MIT License
1.02k stars 182 forks source link

history.state is returned as reference instead of copy #84

Closed izhyvaiev closed 8 years ago

izhyvaiev commented 8 years ago

In HTML5 history.state is returned as copy and in HTML4 fallback for IE9 it's reference. Code like

var currentState = history.state;
currentState.variable = 'some data';

won't affect current history.state in HTML5 but will affect it in HTML4 fallback.