setInterval/setTimeout pass random parameter to callback

RESOLVED DUPLICATE of bug 394769

Status

()

defect
RESOLVED DUPLICATE of bug 394769
11 years ago
11 years ago

People

(Reporter: me, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

11 years ago
User-Agent:       Opera/9.50 (X11; Linux i686; U; en)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080419 Ubuntu/8.04 (hardy) Firefox/2.0.0.14

Both 2.0.0.14 on linux and 3.0 on windows have same problem. Enter string "javascript:void(setInterval(alert, 3000))" in address bar and press <Enter> or "Go" button. This will call alert function every 3 seconds. Function called will receive random numeric value as a parameter in firefox, while other major browsers do not pass any parameters to this function. This quirk is not documented here: http://developer.mozilla.org/en/docs/DOM:window.setInterval 

Reproducible: Always

Steps to Reproduce:
1. Open any page in firefox.
2. Enter string "javascript:void(setInterval(alert, 3000))" in address bar and press <Enter> or "Go" button 
Actual Results:  
Alert dialogs appear one after one, displaying random numbers.

Expected Results:  
Alert dialogs should display 'undefined' or empty string.

Comment 1

11 years ago
see bug 394769 comment #2

Duplicate of bug 394769 ... or Bug 10637
Reporter

Comment 2

11 years ago
Looks like that
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 394769
You need to log in before you can comment on or make changes to this bug.