mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
## Summary I used [link-inspector](https://github.com/justindhillon/link-inspector) to find a bunch of broken links in this projects documentation. Here is what I fixed: https://www.html5rocks.com/en/tutorials/canvas/hidpi/ --> https://web.dev/articles/canvas-hidipi https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts --> https://www.w3.org/TR/custom-elements/ https://github.com/facebookarchive/fixed-data-table/blob/main/src/vendor_upstream/dom/normalizeWheel.js --> https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js https://upload.wikimedia.org/wikipedia/commons/e/ee/Atom_%282%29.png --> https://upload.wikimedia.org/wikipedia/commons/1/1b/Atom.png ## Support my work I used [link-inspector](https://github.com/justindhillon/link-inspector) to find and fix this issue. If you find this PR useful, give the repo a ⭐
34 lines
962 B
JavaScript
34 lines
962 B
JavaScript
/**
|
|
* 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;
|