-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download Builder emits jQuery-UI 1.13.3 custom causing Syntax error in MS WebBrowser control (IE11 mode) #629
Comments
Please provide concrete steps you need to take to hit the issue; the fewer steps, the better. |
Never mind, I see it even on a full build. I agree, this should not be happening. |
It turns out UglifyJS suddenly started outputting ES6 code even if the source didn't contain such constructs: mishoo/UglifyJS#5967. Apparently, there's no official flag to disable it. jQuery has switched to swc which has a flag to specify the ES version, we should just switch the download builder to it. We should also switch jQuery UI. The 1.14.x minified files are also using arrow functions because of this UglifyJS issue - and while IE is not supported there, I'd prefer the minified file to stay in ES5 as long as the unminified one remains in ES5. |
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. Ref mishoo/UglifyJS#5967 Ref jquery/download.jqueryui.com#629
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. Ref mishoo/UglifyJS#5967 Ref jquery/download.jqueryui.com#629
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. Ref mishoo/UglifyJS#5967 Ref jquery/download.jqueryui.com#629
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. But the bigger problem is that we generate ES2015+ minified code even for 1.13.3 releases which support IE. Closes jquerygh-629 Ref mishoo/UglifyJS#5967 Ref jquery#629
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. But the bigger problem is that we generate ES2015+ minified code even for 1.13.3 releases which support IE. Closes jquerygh-629 Ref mishoo/UglifyJS#5967 Ref jquery#629
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. But the bigger problem is that we generate ES2015+ minified code even for 1.13.3 releases which support IE. Closes jquerygh-629 Ref mishoo/UglifyJS#5967 Ref jquery#629
PR: #630 |
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. Closes gh-2335 Ref mishoo/UglifyJS#5967 Ref jquery/download.jqueryui.com#629
I switched the jQuery UI inner build to SWC in jquery/jquery-ui#2335 and added checking that minified files are ES5 in jquery/jquery-ui#2336. The last piece is this Download Builder PR: #630. |
More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in `1.14.x` as long as we keep the source file in ES5. But the bigger problem is that we generate ES2015+ minified code even for `1.13.3` releases which support IE. This change switches the minfied to SWC and ensures ES5 output. Tests ensuring this behavior have been added. Also, GitHub Actions were updated, as the previous versions stopped working. To avoid this happening in the future, automatic dependabot PRs updating actions are now enabled. Fixes gh-629 Closes gh-630 Ref mishoo/UglifyJS#5967 Ref #629
I merged the fix but there are some deployment issues; reopening until I manage to deploy it. |
This should be working properly now. Please report if you find more issues. |
For custom jQuery-UI 13.3.3 packages generated by the Download Builder:
The minified
jquery-ui.min.js
throws a Syntax error in line 6 when used in the Microsoft WebBrowser control which is based on IE https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/webbrowser-control-overview?view=netframeworkdesktop-4.8 .The error is not present/triggered by:
jquery-ui.js
jquery-ui.min.js
.My analysis shows the syntax error is caused by the arrow function that was generated by the minifier, and which is unsupported on the WebBrowser control (and all versions of IE https://caniuse.com/arrow-functions ).
This build error did not exist on or before June 30, 2023.
Since jQuery-UI 1.13 is supporting IE the customized builds should not throw syntax errors.
The text was updated successfully, but these errors were encountered: