addressing issue 50 with regards to ie compatibility

This commit is contained in:
Danny Yoo 2011-09-29 17:20:56 -04:00
parent a1009db26e
commit fbcbe4fa6f
4 changed files with 9 additions and 5 deletions

View File

@ -591,7 +591,7 @@ EOF
(cond
#;[(current-emit-debug-trace?)
(string-append
(format "if(typeof(window.console)!=='undefined'&&typeof(console.log)==='function'){console.log(~s);\n}"
(format "if(typeof(window.console)!=='undefined'&&typeof(window.console.log)==='function'){window.console.log(~s);\n}"
(format "~a" stmt))
assembled)]
[else

View File

@ -516,7 +516,7 @@ EOF
EOF
(if manifest (format "manifest=~s" (path->string manifest)) "")
(if with-legacy-ie-support?
"<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]--><!--lt IE 9?><script src='excanvas.js' type='text/javascript'></script><script src='canvas.text.js'></script><script src='optimer-normal-normal.js'></script><!endif?-->"
"<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=7,chrome=1'><![endif]--><!--lt IE 9?><script src='excanvas.js' type='text/javascript'></script><script src='canvas.text.js'></script><script src='optimer-normal-normal.js'></script><!endif?-->"
"")
title
(string-join (map (lambda (js)

View File

@ -791,7 +791,7 @@
var i;
var result = NULL;
for (i = str.length - 1; i >= 0; i--) {
result = makePair(baselib.chars.makeChar(str[i]), result);
result = makePair(baselib.chars.makeChar(str.charAt(i)), result);
}
return result;
});
@ -1022,7 +1022,7 @@
var index = baselib.numbers.toFixnum(
checkNaturalInRange(M, 'string-ref', 1,
0, firstArg.length));
return baselib.chars.makeChar(firstArg[index]);
return baselib.chars.makeChar(firstArg.charAt(index));
});

View File

@ -132,7 +132,11 @@ var adaptWorldFunction = function(worldFunction) {
},
function(err) {
// FIXME: do error trapping
console.log(err);
if (window.console && window.console.log) {
window.console.log(err);
} else {
throw err;
}
}].concat([].slice.call(arguments, 0, arguments.length - 1)));
};
};