Summary: | with() statement leads to wrong variable object being used (testcase) | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Alastair Scott <alastair.scott> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.0 | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Alastair Scott
2002-11-24 10:52:15 UTC
I see no "freezing" anymore, with KDE-3.1-final, but the images on the chessboard are not set (their src is set to undefined). Here's a testcase for this problem. 51120-frameset.html contains: <frameset> <frame src="51120.html"> </frameset> and 51120.html contains: <html> <script> var diagram = top; function setboard(){ var bild; with(diagram){ // Should set our own var "bild", not a property of "diagram" // (the with() clause was used for other things in this block) bild="hello world"; } alert(bild); } setboard(); </script> </html> The issue is how a with() statement affects the "variable object", the one variables get put into. I'm not sure what the spec says about this. Harri? Fixed (the test case at least) in the HEAD branch. Affected files object.cpp and kjs_window.cpp. Port back to 3.1 branch ? *** Bug has been marked as fixed ***. |