Bug 17977 - REGRESSION(3.0-3.1): Safari/WebKit initializes variables to dom elements
Summary: REGRESSION(3.0-3.1): Safari/WebKit initializes variables to dom elements
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
Keywords: InRadar, Regression
Depends on:
Reported: 2008-03-20 19:22 PDT by David den Boer
Modified: 2008-04-29 11:17 PDT (History)
1 user (show)

See Also:

Reduction for ticket (833 bytes, text/html)
2008-03-20 19:26 PDT, David den Boer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David den Boer 2008-03-20 19:22:37 PDT
I have in my html a variable named foo.
In my html, I have a div element named foo.
In javascript, I check to see if variable foo is undefined, and if so, I take action.
Expected result : action in javascript executes for foo.
Actual result : foo gets defined to the div element foo automatically.
Comment 1 David den Boer 2008-03-20 19:26:34 PDT
Created attachment 19918 [details]
Reduction for ticket

simple test case. If the bug is present, the alert displays the dom node, otherwise it displays a message.
Comment 2 Mark Rowe (bdash) 2008-03-20 20:00:50 PDT
You've marked this as a regression:  what is it a regression from?
Comment 3 David den Boer 2008-03-20 20:05:15 PDT
Behaves correctly in Safari 3.0.4
Comment 4 Mark Rowe (bdash) 2008-03-20 20:12:28 PDT
This may have been an intentional change in behaviour.
Comment 5 Mark Rowe (bdash) 2008-03-20 20:12:56 PDT
Comment 6 Geoffrey Garen 2008-04-29 11:17:53 PDT
IE7, Firefox2, and Opera 9 all disagree with Safari's behavior.