isEventSupported() — react Function Reference
Architecture documentation for the isEventSupported() function in isEventSupported.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 849b528c_c7f4_c2eb_ce7a_1b4cea872d42["isEventSupported()"] c30b243e_ec29_69c6_2af4_f9dbe2733733["isEventSupported.js"] 849b528c_c7f4_c2eb_ce7a_1b4cea872d42 -->|defined in| c30b243e_ec29_69c6_2af4_f9dbe2733733 style 849b528c_c7f4_c2eb_ce7a_1b4cea872d42 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/events/isEventSupported.js lines 25–40
function isEventSupported(eventNameSuffix: string): boolean {
if (!canUseDOM) {
return false;
}
const eventName = 'on' + eventNameSuffix;
let isSupported = eventName in document;
if (!isSupported) {
const element = document.createElement('div');
element.setAttribute(eventName, 'return;');
isSupported = typeof (element: any)[eventName] === 'function';
}
return isSupported;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does isEventSupported() do?
isEventSupported() is a function in the react codebase, defined in packages/react-dom-bindings/src/events/isEventSupported.js.
Where is isEventSupported() defined?
isEventSupported() is defined in packages/react-dom-bindings/src/events/isEventSupported.js at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free