shouldPreventMouseEvent() — react Function Reference
Architecture documentation for the shouldPreventMouseEvent() function in getListener.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD c3b4d100_3a97_ec79_28bd_d0aeea38e3ff["shouldPreventMouseEvent()"] 090215d4_d041_d740_3c6a_2b92c717e601["getListener.js"] c3b4d100_3a97_ec79_28bd_d0aeea38e3ff -->|defined in| 090215d4_d041_d740_3c6a_2b92c717e601 dc523599_fdf9_701c_242d_51dc12a7153c["getListener()"] dc523599_fdf9_701c_242d_51dc12a7153c -->|calls| c3b4d100_3a97_ec79_28bd_d0aeea38e3ff 4b8225b9_e648_d2c4_af55_6040e99a7969["isInteractive()"] c3b4d100_3a97_ec79_28bd_d0aeea38e3ff -->|calls| 4b8225b9_e648_d2c4_af55_6040e99a7969 style c3b4d100_3a97_ec79_28bd_d0aeea38e3ff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/events/getListener.js lines 23–44
function shouldPreventMouseEvent(
name: string,
type: string,
props: Props,
): boolean {
switch (name) {
case 'onClick':
case 'onClickCapture':
case 'onDoubleClick':
case 'onDoubleClickCapture':
case 'onMouseDown':
case 'onMouseDownCapture':
case 'onMouseMove':
case 'onMouseMoveCapture':
case 'onMouseUp':
case 'onMouseUpCapture':
case 'onMouseEnter':
return !!(props.disabled && isInteractive(type));
default:
return false;
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does shouldPreventMouseEvent() do?
shouldPreventMouseEvent() is a function in the react codebase, defined in packages/react-dom-bindings/src/events/getListener.js.
Where is shouldPreventMouseEvent() defined?
shouldPreventMouseEvent() is defined in packages/react-dom-bindings/src/events/getListener.js at line 23.
What does shouldPreventMouseEvent() call?
shouldPreventMouseEvent() calls 1 function(s): isInteractive.
What calls shouldPreventMouseEvent()?
shouldPreventMouseEvent() is called by 1 function(s): getListener.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free