isCustomElement.js — react Source File
Architecture documentation for isCustomElement.js, a javascript file in the react codebase. 0 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR a7faeba1_82ce_c9a3_9363_b5e70d18a977["isCustomElement.js"] 1e990658_7cea_75be_1f24_2399bdf9f15b["ReactDOMComponent.js"] 1e990658_7cea_75be_1f24_2399bdf9f15b --> a7faeba1_82ce_c9a3_9363_b5e70d18a977 ddc0fe5b_559e_c0f1_b50a_2b1305b3c3d7["ChangeEventPlugin.js"] ddc0fe5b_559e_c0f1_b50a_2b1305b3c3d7 --> a7faeba1_82ce_c9a3_9363_b5e70d18a977 7bf34687_c093_d285_ad96_da146989d7e6["ReactDOMUnknownPropertyHook.js"] 7bf34687_c093_d285_ad96_da146989d7e6 --> a7faeba1_82ce_c9a3_9363_b5e70d18a977 style a7faeba1_82ce_c9a3_9363_b5e70d18a977 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
function isCustomElement(tagName: string, props: Object): boolean {
if (tagName.indexOf('-') === -1) {
return false;
}
switch (tagName) {
// These are reserved SVG and MathML elements.
// We don't mind this list too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts
case 'annotation-xml':
case 'color-profile':
case 'font-face':
case 'font-face-src':
case 'font-face-uri':
case 'font-face-format':
case 'font-face-name':
case 'missing-glyph':
return false;
default:
return true;
}
}
export default isCustomElement;
Domain
Subdomains
Functions
Imported By
Source
Frequently Asked Questions
What does isCustomElement.js do?
isCustomElement.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in isCustomElement.js?
isCustomElement.js defines 1 function(s): isCustomElement.
What files import isCustomElement.js?
isCustomElement.js is imported by 3 file(s): ChangeEventPlugin.js, ReactDOMComponent.js, ReactDOMUnknownPropertyHook.js.
Where is isCustomElement.js in the architecture?
isCustomElement.js is located at packages/react-dom-bindings/src/shared/isCustomElement.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-dom-bindings/src/shared).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free