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