🐛 use shadow root element to query qiankun head directlly (#2148)
This commit is contained in:
parent
1faa094eb3
commit
c73265db50
|
|
@ -34,8 +34,7 @@ declare global {
|
|||
}
|
||||
|
||||
export const getAppWrapperHeadElement = (appWrapper: Element | ShadowRoot): Element => {
|
||||
const rootElement = 'host' in appWrapper ? appWrapper.host : appWrapper;
|
||||
return rootElement.getElementsByTagName(qiankunHeadTagName)[0];
|
||||
return appWrapper.querySelector(qiankunHeadTagName)!;
|
||||
};
|
||||
|
||||
export function isExecutableScriptType(script: HTMLScriptElement) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user