Skip to content
New issue

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

iframe 沙箱内 performance.now() 获取的值不是页面的停留时间 #1096

Open
alphatr opened this issue Feb 19, 2024 · 1 comment
Open
Labels
discussion discuss feature Planned functions

Comments

@alphatr
Copy link

alphatr commented Feb 19, 2024

背景

描述您希望改进的问题。

micro-app版本:1.0.0-rc.4

iframe 沙箱内 performance.now() 获取的值不是页面的停留时间;可能跟沙箱实现方式相关,获取的时间是 iframe 沙箱的启动时间,不知道是否是符合预期的行为

期望的效果

非预期的行为的话,是否可以在子应用中 performance 跳出沙箱,直接使用基座应用的 performance 变量;或者如果是预期行为的话,可以在文档中有类似 子应用中操作location异常 这样的提示,引导使用 window.rawWindow.performance

@alphatr alphatr changed the title iframe 沙箱内 performance.now() 获取的值不是页面的时间 iframe 沙箱内 performance.now() 获取的值不是页面的停留时间 Feb 19, 2024
@bailicangdu bailicangdu added feature Planned functions discussion discuss labels Feb 23, 2024
@bailicangdu
Copy link
Contributor

iframe沙箱下子应用的performance和基座是分开的,这确实会导致一些误解,后续会考虑是否和基座保持一致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion discuss feature Planned functions
Projects
None yet
Development

No branches or pull requests

2 participants