| Summary: | [testcase] javascript gives syntax error on variable named "goto" | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Roger Larsson <roger.larsson> |
| Component: | kjs | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
"goto" is a reserved word (as expected) http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/keywords.htm#1002170 but as I understand it is not actually used. Of cause IE allows it as a variable name - yet another quirk... _I wish_ that konqueror handles this as IE when in IE mode. "final" is appearantly another example as can be seen on https://profile.microsoft.com:443/aspnet_client/system_web/1_1_4322/WebUIValidation.js Duping to a bug showing a broken webpage. *** This bug has been marked as a duplicate of 120925 *** What is better? * A linked webpage that can change. * Code embedded in the report I would take the embedded code any day! Yeah, but it has the comment saying it's the same bug -- except the page has package, too :-). I was going to change the title, but bugzilla was slow. Anyway, I'll try to fix this for 3.5.2 |
Version: 3.3.91 (using KDE 3.3.91 (beta1), compiled sources) Compiler: gcc version 3.3.4 (pre 3.3.5 20040809) OS: Linux (i686) release 2.6.8-24.5-default The java script parser does not like goto as a variable name. Other browsers (read IE) does not have a problem with this (since it is found on a frequently used travel site - Appollo.se). But the site does not work in Mozilla either - probably this problem since it complains in its Console: "missing formal parameter" --script-test.html-- <html> <head> <title>Variable name problem</title> <script language="JavaScript" src="script2.js"></script> <script language="JavaScript" src="script1.js"></script> </head> --script1.js-- function newWin(goto,bredd,hojd) { } --script2.js-- function newWin(got,bredd,hojd) { }