Frontend: various small fixes to Typescript code#1329
Merged
gusthoff merged 7 commits intoAdaCore:mainfrom Mar 22, 2026
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bare except clauses catch KeyboardInterrupt and SystemExit, making the script impossible to interrupt cleanly via Ctrl+C. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The getElemsByTag describe block had a copy-paste description saying 'have the class' instead of 'have the tag'. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all loose == and != comparisons with === and !==. None of these caused behavioral bugs (all were same-type comparisons), but they were inconsistent with TypeScript best practices. Affected files: widget.ts, download.ts, areas.ts, sandbox-redirect.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All three JSON.parse calls on widget/download switch data were unprotected. A malformed data-switches attribute would throw an uncaught exception silently breaking functionality. - download.ts getUnparsedSwitches(): rethrow with descriptive message - widget.ts download button handler: show error and return early - widget.ts buttonCB(): show error, hide spinner, and return early Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t.ts Two locations built HTML by concatenating untrusted strings into innerHTML, creating an XSS vector if switch names, titles, or error messages ever contain HTML special characters. - initCompilerSwitches(): build tooltip via createElement/textContent/appendChild - widgetFactory() catch block: build error paragraph via createElement/textContent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.