Skip to content

Commit

Permalink
🐛 document head in micro app should use the proxied appendChild metho…
Browse files Browse the repository at this point in the history
…ds (#2502)
  • Loading branch information
kuitos authored May 16, 2023
1 parent 5f26a1a commit 8440aa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sandbox/patchers/dynamicAppend/forStrictSandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ function patchDocument(cfg: { sandbox: SandBox; speedy: boolean }) {
case 'head': {
const containerConfig = proxyAttachContainerConfigMap.get(sandbox.proxy);
if (containerConfig) {
return getAppWrapperHeadElement(containerConfig.appWrapperGetter());
const qiankunHead = getAppWrapperHeadElement(containerConfig.appWrapperGetter());
qiankunHead.appendChild = HTMLHeadElement.prototype.appendChild;
qiankunHead.insertBefore = HTMLHeadElement.prototype.insertBefore;
return qiankunHead;
}
break;
}
Expand Down

1 comment on commit 8440aa5

@vercel
Copy link

@vercel vercel bot commented on 8440aa5 May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.