src/js/iframe_embed/embedder.js
branchnew-model
changeset 910 b9f1bd52df9a
parent 906 4b6e154ae8de
child 1072 ac1eacb3aa33
equal deleted inserted replaced
909:aa0e42229784 910:b9f1bd52df9a
    21     
    21     
    22     window.onhashchange = _updater;
    22     window.onhashchange = _updater;
    23     
    23     
    24     window.addEventListener('message', function(_e) {
    24     window.addEventListener('message', function(_e) {
    25         if (/^#/.test(_e.data) && !_blocked) {
    25         if (/^#/.test(_e.data) && !_blocked) {
    26             document.location.hash = _e.data;
    26             if (typeof window.history !== "undefined" && typeof window.history.replaceState !== "undefined") {
       
    27                 window.history.replaceState({}, "", _e.data);
       
    28             } else {
       
    29                 document.location.hash = _e.data;
       
    30             }
    27         }
    31         }
    28     });
    32     });
    29     
    33     
    30     window.setTimeout(_updater, 2000);
    34     window.setTimeout(_updater, 2000);
    31     
    35