X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Ftransports.phh;h=2d9714ef8f386631e28d1dd272a518c4e9a2ddf9;hb=9a47c903403cc9ced0120c237af9bec7dbec4a76;hp=0f0e4a7c8b05d88059420dc6b7c8dc03b5202733;hpb=c35dd062490b68aa01f887afa3ddf705b3e32372;p=brisk.git diff --git a/web/Obj/transports.phh b/web/Obj/transports.phh index 0f0e4a7..2d9714e 100644 --- a/web/Obj/transports.phh +++ b/web/Obj/transports.phh @@ -90,6 +90,7 @@ class Transport_xhr { static function fini($init_string, $base, $blockerr) { + return (sprintf('@BEGIN@ %s window.onbeforeunload = null; window.onunload = null; document.location.assign("%sindex.php"); @END@', ($blockerr ? 'xstm.stop(); ' : ''), $base)); return (""); } @@ -123,7 +124,7 @@ var xynt_streaming = \"ready\";", $base, $base); if ($step > 0) $ret .= sprintf("last_clean = %d;\n", ($step-1)); $ret .= sprintf(" -window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming.transp.stopped = true; } }; +window.onload = function () { try { if (xynt_streaming != \"ready\") { xynt_streaming.transp.stopped = true; } } catch(e) { /* console.log(\"catcha\"); */ } }; "); @@ -142,7 +143,7 @@ window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming. "); @@ -187,5 +188,14 @@ class Transport { return new Transport_iframe(); } } + static function gettype($transp) + { + if ($transp == 'xhr' || $transp == 'htmlfile') { + return "Transport_".$transp; + } + else { + return 'Transport_iframe'; + } + } } ?> \ No newline at end of file