🐛 document head in micro app should use the proxied appendChild methods (#2502)

This commit is contained in:
Kuitos 2023-05-16 16:21:27 +08:00 committed by GitHub
parent 5f26a1a646
commit 8440aa5483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,10 @@ function patchDocument(cfg: { sandbox: SandBox; speedy: boolean }) {
case 'head': { case 'head': {
const containerConfig = proxyAttachContainerConfigMap.get(sandbox.proxy); const containerConfig = proxyAttachContainerConfigMap.get(sandbox.proxy);
if (containerConfig) { if (containerConfig) {
return getAppWrapperHeadElement(containerConfig.appWrapperGetter()); const qiankunHead = getAppWrapperHeadElement(containerConfig.appWrapperGetter());
qiankunHead.appendChild = HTMLHeadElement.prototype.appendChild;
qiankunHead.insertBefore = HTMLHeadElement.prototype.insertBefore;
return qiankunHead;
} }
break; break;
} }