Closed alex-solovyev closed 2 days ago
That's odd, but I cannot reproduce the issue when using Google Chrome for Testing on the same laptop (macOS Monterey 12.7.6, Intel processor).
The issue only appears in the version of the browser installed from https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg
There's a proposed new TC39 feature that creates a using
keyword.
https://github.com/tc39/proposal-explicit-resource-management
Based on the error message, it seems like the attempt to parse that line as a using
statement is the cause. However, the current code is valid Javascript. That using
variable is declared earlier in the scope.
I would report this problem to Chrome as a bug. Changing this line in jQuery UI will not really help, because there are so many sites using the current jQuery UI version that will not be updated. All of those sites would still be broken.
Thank you, @dmethvin! I missed that it was declared above in the code.
Related issues:
I started encountering an error after upgrading Google Chrome to Version 131.0.6778.86 (Official Build) (x86_64).
The issue is reproducible only when using the uncompressed version of jQuery UI. The relevant code:
It seems that the variable using is being used as a function without being declared properly. Adding
var
in front ofusing
resolves the issue.Example: CodePen link