diff options
author | Thomas BrĂ¼derli | 2007-07-02 15:08:10 +0000 |
---|---|---|
committer | Thomas BrĂ¼derli | 2007-07-02 15:08:10 +0000 |
commit | e5f8ed4dedc9588ad8456420f4895287c08946c5 (patch) | |
tree | 087dbb05a967f7a76af141487b5c7508292f47b4 | |
parent | 561492c367a3fb054891305eb3cd27f613c6ee7b (diff) | |
download | itools-e5f8ed4dedc9588ad8456420f4895287c08946c5.tar.gz itools-e5f8ed4dedc9588ad8456420f4895287c08946c5.tar.bz2 itools-e5f8ed4dedc9588ad8456420f4895287c08946c5.zip |
Wait for parent window to load it_state script
-rw-r--r-- | itjs/state.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/itjs/state.html b/itjs/state.html index 08ab639..3029932 100644 --- a/itjs/state.html +++ b/itjs/state.html @@ -5,11 +5,13 @@ return <<<EOF <head> <title></title> <script type="text/javascript"> +var state_load_attempts = 0; function state_onload() { - if (parent.it_state) + if (state_load_attempts < 30) { - if (parent.it_state.ready) + state_load_attempts++; + if (parent.it_state && parent.it_state.ready) parent.setTimeout(parent.it_state_restore_history, 1); else window.setTimeout(state_onload, 90); |