fix: audit Web API binding contracts - #349
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a11e7cfb79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidden) | ||
| */ | ||
| mutable hidden: unknown, | ||
| mutable hidden: Null.t<unknown>, |
There was a problem hiding this comment.
Keep HTMLElement.hidden non-nullable
HTMLElement.hidden returns a boolean or the "until-found" string; it never returns null. Wrapping the property in Null.t makes every read handle an impossible absence and requires callers to wrap ordinary boolean/string assignments. Keep this as a non-null union (or retain the previous unknown representation) in all three duplicated HTMLElement records.
Useful? React with 👍 / 👎.
Summary
Null.tfor JavaScriptnullandoptionfor undefined-only values@throws(JsExn)to synchronous bindings that can throwNo audited binding required
Nullable.t; the reviewed APIs distinguishnullfrom undefined-only values.Verification
npm testnpm run format:checknpm run check:featuresgit diff --checkStack created with GitHub Stacks CLI • Give Feedback