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.
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.
You've marked this as a regression: what is it a regression from?
Behaves correctly in Safari 3.0.4
This may have been an intentional change in behaviour.
<rdar://problem/5811736>
IE7, Firefox2, and Opera 9 all disagree with Safari's behavior.
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 based on attached test case (assuming it is correct - it does not have any errors in Console) and the browser shows dialog box saying 'This is correct behaviour'. It matches with all other browsers (Chrome Canary 105 and Firefox Nightly 104). I think it was fixed along the way and this can be marked as "RESOLVED CONFIGURATION CHANGED". If I am testing incorrectly, please test accordingly. Thanks!