473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Argumentative

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>

Jul 23 '05 #1
2 991


RobB wrote:
Can anyone explain this behavior, in moz/gecko? 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'));
} timerID = setTimeout(foo, 1000);


That is a known issue that there is a parameter passed to the function, see
<https://bugzilla.mozilla.org/show_bug.cgi?id=263945>
I don't think it is regarded a bug by anyone who could fix it.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Martin Honnen wrote:
RobB wrote:
Can anyone explain this behavior, in moz/gecko?
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'));
}

timerID = setTimeout(foo, 1000);


That is a known issue that there is a parameter passed to the

function, see <https://bugzilla.mozilla.org/show_bug.cgi?id=263945>
I don't think it is regarded a bug by anyone who could fix it.
--

Martin Honnen
http://JavaScript.FAQTs.com/


Thanks Martin ! Interesting comments, particularly the ultimate one
from Brendan Eich. The 'phantom' parameter was invalidating an attempt
to determine whether the call was the original one (with arguments).

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
10
by: Rich | last post by:
Hello, I have not been working with ASP for too long at this time and am not real familiar with a lot of things about ASP. I have searched for articles on the following question but not come up...
20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
300
by: Ståle Sæbøe | last post by:
I am a bit curious about this. The graphic design people I work with say it is their preferred font for web pages. The reason being that it is "kinder" to the eye both in terms of shape and...
43
by: Minti | last post by:
Hi there everybody, I was just wondering that too many people choose to use language like Java because of its architecture independence, this AI is achieved because Java is as such a...
67
by: Scott M. | last post by:
Can anyone give me any ideas on why VS.NET 2003 running on XP Pro. (P4's with 1GB RAM) would take over 3 minutes to simply create a new ASP.NET Web Application on http://localhost? It seems that...
22
by: Ben Finney | last post by:
Howdy all, I've recently packaged 'enum' in PyPI. In its description, I make the claim that it creates "immutable" enumeration objects, and that the enumeration values are "constant" values. ...
26
by: Matt Kruse | last post by:
Are there any current browsers that have Javascript support, but not RegExp support? For example, cell phone browsers, blackberrys, or other "minimal" browsers? I know that someone using Netscape...
23
by: Tony Johansson | last post by:
Hello! I just wonder what is the point of having the reader variable declared as TextReader in the snippet below.. Is it because of using the polymorfism on the reader variable perhaps. using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.