Skip to content

refactor: move event primitives into DOM - #282

Open
jderochervlk wants to merge 1 commit into
codex/event-type-featurefrom
codex/event-api-split
Open

refactor: move event primitives into DOM#282
jderochervlk wants to merge 1 commit into
codex/event-type-featurefrom
codex/event-api-split

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Stack context

Part 2 of 16 in the first Option 5 stack: flat interface ownership and compatibility cleanup.

Review this PR as the incremental diff against #298.

Summary

  • move foundational event, event-target, abort, listener, and initialization types into DOM
  • remove the obsolete BaseEvent and EventTypes wrapper modules retained by refactor: separate EventType feature #298
  • update interface bindings to use the shared DOM event types directly
  • remove duplicate global event-listener bindings from DomGlobal

Temporary state

  • this PR removes the temporary event wrappers introduced at the bottom of the stack; it does not add a replacement compatibility module
  • the broad source-folder layout and initial five-feature configuration remain temporary until the follow-up Option 5 folder/feature stack

Review focus

  • whether the types moved into DOM are genuinely foundational
  • whether all former wrapper consumers preserve their public signatures

Verification

  • npm run build
  • npm test
  • npm run format:check

@jderochervlk
jderochervlk changed the base branch from main to codex/event-api-split-without-rescript-13 June 26, 2026 17:33
@jderochervlk
jderochervlk changed the base branch from codex/event-api-split-without-rescript-13 to main June 26, 2026 17:34
Comment thread src/Base/DOM_.res Outdated
Comment thread src/DOM/DomGlobal.res
*/
@editor.completeFrom(BaseCSSFontLoading.FontFaceSet)
type rec fontFaceSet = private {
...BaseEvent.eventTarget,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was just spreading an empty object and creating a circular dependency.

Comment thread src/Base/DOM.res Outdated
Comment on lines +30 to +32
@editor.completeFrom(Window)
type window = private {}
external window: window = "window"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Adding this here allows accessing the window using DOM.window instead of Window.current.

Comment thread src/Base/DOM.res
@jderochervlk
jderochervlk changed the base branch from main to remove-dom-prefix July 6, 2026 17:11
@jderochervlk jderochervlk changed the title [codex] split Event owner types refactor: restructure Event and related files Jul 6, 2026
@jderochervlk
jderochervlk marked this pull request as ready for review July 6, 2026 19:23
@jderochervlk
jderochervlk changed the base branch from remove-dom-prefix to main July 9, 2026 14:14
@jderochervlk
jderochervlk force-pushed the codex/event-api-split branch from 9b0b39b to 8f370a1 Compare August 3, 2026 18:06
@jderochervlk jderochervlk changed the title refactor: restructure Event and related files refactor: move event primitives into DOM Aug 3, 2026
@jderochervlk
jderochervlk changed the base branch from main to codex/event-type-feature August 3, 2026 18:07
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.

2 participants