We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
描述bug window上的事件比如onload 和 document.write添加 script 标签无法生效
The text was updated successfully, but these errors were encountered:
我看了下,现在是把子应用的window.onxxx直接指向主应用的window.onxxx
这样多个子应用同时用到window.onxxx的话会有问题,没有隔离
为什么不直接挂在iframeWindow上呢?
此外可能需要在mount和unmount的时候手动处理一些事件了
Sorry, something went wrong.
@jk4235
不管挂哪里都是有问题的,比如:挂在 iframeWindow.onload上,iframe 是一开始就准备好的,子应用的 js 是 iframe ready 后注入的也就是说 js 里面的 window.onload 事件永远都不会触发,这个地方估计要框架维护一个针对 load 事件、domContentLoaded事件之类的事件列表,进行手动触发。
当然框架也提供了 plugin:windowAddEventListenerHook、windowPropertyOverride,用户可以自行 diy 这个地方
这个地方估计要框架维护一个针对 load 事件、domContentLoaded事件之类的事件列表,进行手动触发。
对,我的意思就是直接挂在iframeWindow上,然后手动在对应的生命周期里invoke,避免多个子应用互相干扰
明白,这个地方如果有兴趣可以 pr,我估计没这么快
No branches or pull requests
描述bug
window上的事件比如onload 和 document.write添加 script 标签无法生效
The text was updated successfully, but these errors were encountered: