check if history.replaceState exists

This commit is contained in:
rolux 2012-05-25 18:51:26 +02:00
parent 13d5de1c81
commit d14abf96fc

View file

@ -709,7 +709,9 @@ Ox.URL = function(options) {
replaceState(state, title, url); replaceState(state, title, url);
} }
function 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; document.title = title;
callback && callback(state); callback && callback(state);
} }