Semantic Diff

#9075 Add missing JSX DOM event bindings

1 commit

85f31fbb15ef96bd168d6e99055ad4808810d6e0..pr-9075

3f55f1ee2 · glennsl · Oct 27, 2026, 12:39 UTC

Add missing JSX DOM event bindings

Why

React DOM event handlers are missing from JsxDOM.domProps, forcing local extensions for dialogs, popovers, fullscreen, and capture-phase events. Match the event registrations and toggle fields in React DOM 19.3.1.

modifiedTyping JsxDOM.domProps

rescript
Before Representative existing handlers
After Existing handlers remain; missing handlers and capture variants are added
onCancel?: JsxEvent.Synthetic.t => unit,onCancelCapture?: JsxEvent.Synthetic.t => unit,onClose?: JsxEvent.Synthetic.t => unit,onCloseCapture?: JsxEvent.Synthetic.t => unit,onFullscreenChange?: JsxEvent.Synthetic.t => unit,onFullscreenChangeCapture?: JsxEvent.Synthetic.t => unit,onFullscreenError?: JsxEvent.Synthetic.t => unit,onFullscreenErrorCapture?: JsxEvent.Synthetic.t => unit,onBeforeToggle?: JsxEvent.Toggle.t => unit,onBeforeToggleCapture?: JsxEvent.Toggle.t => unit,onToggle?: JsxEvent.Toggle.t => unit,onToggleCapture?: JsxEvent.Toggle.t => unit,onClick?: JsxEvent.Mouse.t => unit,onClick?: JsxEvent.Mouse.t => unit, onClickCapture?: JsxEvent.Mouse.t => unit,onScroll?: JsxEvent.UI.t => unit,onScroll?: JsxEvent.UI.t => unit, onScrollCapture?: JsxEvent.UI.t => unit,onScrollEnd?: JsxEvent.UI.t => unit,onScrollEndCapture?: JsxEvent.UI.t => unit,onTransitionEnd?: JsxEvent.Transition.t => unit,onTransitionEnd?: JsxEvent.Transition.t => unit, onTransitionEndCapture?: JsxEvent.Transition.t => unit,… auxiliary-click, resize, transition cancel/run/start, and remaining capture handlers

addedTyping JsxEvent.Toggle

rescript
After
module Toggle = {  type tag  type t = synthetic<tag>  include MakeEventWithType({type t = t})  @get external oldState: t => [#closed | #"open"] = "oldState"  @get external newState: t => [#closed | #"open"] = "newState"  @get @return(nullable) external source: t => option<Dom.element> = "source"}

The JSX fixture covers the added handlers and toggle accessors. The editor completion snapshot is regenerated against the rebased compiler.

Review

  • Does this require React 19.3 for existing applications? No existing signatures change. Fullscreen handlers and the synthetic toggle source are available in React 19.3. The source accessor returns None for null or undefined, including on older React versions.
  • Are enter/leave capture handlers included? No. React's mouse and pointer enter/leave events have no capture phase.