Const syntheticEventTypes
syntheticEventTypes: { prop: string; type: string }[] = [{ prop: "bubbles", type: "boolean" },{ prop: "cancelable", type: "boolean" },{ prop: "defaultPrevented", type: "boolean" },{ prop: "eventPhase", type: "number" },{ prop: "isTrusted", type: "boolean" },{ prop: "preventDefault", type: "function" },{ prop: "isDefaultPrevented", type: "function" },{ prop: "stopPropagation", type: "function" },{ prop: "isPropagationStopped", type: "function" },{ prop: "persist", type: "function" },{ prop: "timeStamp", type: "number" },{ prop: "type", type: "string" },]
Const withShadowDOM
withShadowDOM: (arg: A) => R = memoized(withShadowDOMCache, (C: string) =>React.forwardRef<HTMLElement, any>(({ children, ...props }, ref) => {const shadowRef = useRef<HTMLElement>(null);const [root, setRoot] = useState<ShadowRoot | null>(null);useEffect(() => {const el = shadowRef.current;if (typeof ref === "function") {ref(el);} else if (ref) {ref.current = el;}if (!el || root) {return;}setRoot(el.attachShadow({ mode: "open" }));}, [root]);return React.createElement(C,{ ...props, ref: shadowRef },root? ReactDOM.createPortal(React.createElement(React.Fragment, {}, children),(root as any) as HTMLElement): null);}))
From https://reactjs.org/docs/events.html