check if history.replaceState exists
This commit is contained in:
parent
13d5de1c81
commit
d14abf96fc
1 changed files with 3 additions and 1 deletions
|
@ -709,7 +709,9 @@ Ox.URL = function(options) {
|
|||
replaceState(state, title, url);
|
||||
}
|
||||
function replaceState(state, title, url) {
|
||||
history.replaceState(Ox.extend(state, {title: title}), '', url);
|
||||
history.replaceState && history.replaceState(
|
||||
Ox.extend(state, {title: title}), '', url
|
||||
);
|
||||
document.title = title;
|
||||
callback && callback(state);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue