Skip to content

refactor: establish HTML folder feature - #327

Open
jderochervlk wants to merge 1 commit into
codex/option5-dom-nodes-folderfrom
codex/option5-html-folder
Open

refactor: establish HTML folder feature#327
jderochervlk wants to merge 1 commit into
codex/option5-dom-nodes-folderfrom
codex/option5-html-folder

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Stack context

Part 17 of the Option 5 folder-feature stack.

Review this PR as the incremental diff against #326.

Summary

  • add the target src/html folder on the unqualified internal HTML feature
  • move 61 non-media HTML interface modules out of the legacy broad DOM folder
  • add the supported WebAPI.HTML -> WebAPI.DOMNodes + WebAPI.File + HTML feature
  • expose the existing HTMLUnknownElement interface publicly
  • preserve every existing flat HTML module path and binding signature

Media boundary

DomHTMLMediaElement, HTMLAudioElement, HTMLTrackElement, and HTMLVideoElement remain for the next Media layer. Their APIs directly reference Remote Playback, Picture-in-Picture, WebVTT, media-error, time-range, and playback-quality types. Moving them here would create an HTML <-> Media cycle because Media already depends on HTML.

Temporary state

  • the four media-specific HTML interfaces remain in the legacy folder for one layer and move with Media next
  • HTML.res is received transitively from DOMNodes because Element and ShadowRoot require its serialization/shadow-root options
  • final helper-type cleanup remains deferred

Review focus

  • HTML folder membership and the explicit media boundary
  • the WebAPI.HTML dependency closure
  • public exposure of HTMLUnknownElement

Verification

  • node_modules/.bin/rescript clean
  • node_modules/.bin/rescript build --prod --features DOM,Event,DOMPlatform,Animation,CSSOM,Geometry,DOMNodes,File,HTML
  • npm run build
  • npm test
  • npm run format:check
  • git diff --check

Copy link
Copy Markdown
Collaborator Author

@codex

@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: 9604786121

ℹ️ 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 rescript.json
"public": [
"CustomElementRegistry",
"Document",
"DomHTMLMediaElement",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep HTMLElement available to the DOM feature

When a consumer builds only WebAPI.DOM, this source group still compiles DomHTMLMediaElement and HTMLTrackElement, whose implementations include HTMLElement.Impl (src/DOM/DomHTMLMediaElement.res:147 and src/DOM/HTMLTrackElement.res:14). Because HTMLElement was moved behind the separate HTML feature and WebAPI.DOM does not enable it, that previously valid feature-only build now fails with an unresolved module; keep the base module in the DOM slice until these media interfaces move, or otherwise ensure the slice includes their dependency.

Useful? React with 👍 / 👎.

@jderochervlk
jderochervlk force-pushed the codex/option5-html-folder branch from 9604786 to b9e476c Compare August 4, 2026 17:31
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