From b0000b516943360c2c2391bbb33a0e77a6f32404 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 25 May 2012 19:58:43 +0200 Subject: [PATCH] check if history.pushState exists --- source/Ox.UI/js/Core/Ox.URL.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Core/Ox.URL.js b/source/Ox.UI/js/Core/Ox.URL.js index 6606294c..2308332c 100644 --- a/source/Ox.UI/js/Core/Ox.URL.js +++ b/source/Ox.UI/js/Core/Ox.URL.js @@ -649,7 +649,9 @@ Ox.URL = function(options) { @*/ that.pop = function() { if (self.previousURL) { - history.pushState({}, self.previousTitle, self.previousURL); + history.pushState && history.pushState( + {}, self.previousTitle, self.previousURL + ); document.title = self.previousTitle; } return !!self.previousURL; @@ -681,7 +683,9 @@ Ox.URL = function(options) { + document.location.search + document.location.hash; if (url != self.previousURL) { - history.pushState(Ox.extend(state, {title: title}), '', url); + history.pushState && history.pushState( + Ox.extend(state, {title: title}), '', url + ); document.title = title; callback && callback(state); }