From c3cba034c8009b65c25dd4ef5f54b18d9c8ee7d4 Mon Sep 17 00:00:00 2001 From: Thomas BrĂ¼derli Date: Tue, 24 Jul 2007 09:54:33 +0000 Subject: Improved it_state with Safari support --- itjs/state.html | 6 +++--- itjs/state.js | 16 +++++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/itjs/state.html b/itjs/state.html index 3029932..36f36c0 100644 --- a/itjs/state.html +++ b/itjs/state.html @@ -16,16 +16,16 @@ function state_onload() else window.setTimeout(state_onload, 90); } - window.onbeforeunload = state_onbeforeunload; + window[(document.all?'onbeforeunload':'onunload')] = state_onbeforeunload; } function state_onbeforeunload() { - if (parent.it_state) + if (parent.it_state && !parent.it_state.it_state_saved) parent.it_state.store_state(); } -
+