Can anyone explain this behavior, in moz/gecko?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body>
<script type="text/javascript">
document.write(
'<pre>',
foo,
'\n\n',
'foo(\'one\')\n',
'foo(\'one\',\'two\')\n',
'timerID = setTimeout(foo, 1000)'
);
var timerID = null;
function foo()
{
var args = [];
for (a = 0; a < arguments.length; ++a)
args.push('arguments[' + a + '] = ' + arguments[a]);
if (timerID) args.push('timerID: ' + timerID);
alert('arguments.length = ' + arguments.length + '\n\n' +
args.join('\n'));
}
foo('one');
foo('one', 'two');
timerID = setTimeout(foo, 1000);
</script>
</body>
</html>