Mercurial > urweb
diff lib/js/urweb.js @ 1038:dcc6093e9575
Get message-passing working in IE6
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 21 Nov 2009 15:48:08 -0500 |
parents | 83d8ddd09d95 |
children | 8932f855fa85 |
line wrap: on
line diff
--- a/lib/js/urweb.js Sat Nov 21 14:29:35 2009 -0500 +++ b/lib/js/urweb.js Sat Nov 21 15:48:08 2009 -0500 @@ -487,7 +487,7 @@ function ts(x) { return x.toString() } function bs(b) { return (b ? "True" : "False") } -function sub(s, i) { return s[i]; } +function sub(s, i) { return s.charAt(i); } function suf(s, i) { return s.substring(i); } function slen(s) { return s.length; } function sidx(s, ch) { @@ -499,7 +499,7 @@ } function sspn(s, chs) { for (var i = 0; i < s.length; ++i) - if (chs.indexOf(s[i]) != -1) + if (chs.indexOf(s.charAt(i)) != -1) return i; return null; @@ -550,14 +550,14 @@ function uf(s) { if (s.length == 0) return "_"; - return (s[0] == '_' ? "_" : "") + return (s.charAt(0) == '_' ? "_" : "") + escape(s).replace(new RegExp ("/", "g"), "%2F").replace(new RegExp ("\\+", "g"), "%2B"); } function uu(s) { - if (s.length > 0 && s[0] == '_') + if (s.length > 0 && s.charAt(0) == '_') { s = s.substring(1); - else if (s.length >= 3 && s[0] == '%' && s[1] == '5' && (s[2] == 'f' || s[2] == 'F')) + } else if (s.length >= 3 && s.charAt(0) == '%' && s.charAt(1) == '5' && (s.charAt(2) == 'f' || s.charAt(2) == 'F')) s = s.substring(3); return unescape(s.replace(new RegExp ("\\+", "g"), " ")); } @@ -657,7 +657,7 @@ } function path_join(s1, s2) { - if (s1.length > 0 && s1[s1.length-1] == '/') + if (s1.length > 0 && s1.charAt(s1.length-1) == '/') return s1 + s2; else return s1 + "/" + s2; @@ -754,6 +754,8 @@ } } + xhr.abort(); + connect(); } else {