Skip to content

fix: audit Web API binding contracts - #349

Draft
jderochervlk wants to merge 1 commit into
mainfrom
agent/audit-webapi-bindings
Draft

fix: audit Web API binding contracts#349
jderochervlk wants to merge 1 commit into
mainfrom
agent/audit-webapi-bindings

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • audit Web API binding returns and properties for spec-defined absence, using Null.t for JavaScript null and option for undefined-only values
  • propagate absence through promise result types and add @throws(JsExn) to synchronous bindings that can throw
  • update compile-time contract tests for the corrected nullable APIs

No audited binding required Nullable.t; the reviewed APIs distinguish null from undefined-only values.

Verification

  • npm test
  • npm run format:check
  • npm run check:features
  • git diff --check

Stack created with GitHub Stacks CLIGive Feedback

@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T14:43:22.198827Z a11e7cf Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/dom-nodes/DOMTree.res
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidden)
*/
mutable hidden: unknown,
mutable hidden: Null.t<unknown>,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant