UNPKG

@hsui/micro-app

Version:

Hundsun micro-app framework

23 lines (22 loc) 1.32 kB
export declare const rawHeadAppendChild: <T extends Node>(node: T) => T; export declare function isHijackingTag(tagName?: string): boolean; /** * Check if a style element is a styled-component liked. * A styled-components liked element is which not have textContext but keep the rules in its styleSheet.cssRules. * Such as the style element generated by styled-components and emotion. * @param element */ export declare function isStyledComponentsLike(element: HTMLStyleElement): number; export declare function recordStyledComponentsCSSRules(styleElements: HTMLStyleElement[]): void; export declare function getStyledElementCSSRules(styledElement: HTMLStyleElement): CSSRuleList | undefined; export type ContainerConfig = { appName: string; proxy: WindowProxy; strictGlobal: boolean; dynamicStyleSheetElements: HTMLStyleElement[]; appWrapperGetter: CallableFunction; scopedCSS: boolean; excludeAssetFilter?: CallableFunction; }; export declare function patchHTMLDynamicAppendPrototypeFunctions(isInvokedByMicroApp: (element: HTMLElement) => boolean, containerConfigGetter: (element: HTMLElement) => ContainerConfig): () => void; export declare function rebuildCSSRules(styleSheetElements: HTMLStyleElement[], reAppendElement: (stylesheetElement: HTMLStyleElement) => boolean): void;