-
Notifications
You must be signed in to change notification settings - Fork 949
feat(DocumentContext): document provider and hook #3516
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
base: main
Are you sure you want to change the base?
Conversation
|
const timerId = globalThis.window.setTimeout(() => setCanRender(true), delayMs); | ||
return () => globalThis.window.clearTimeout(timerId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chaance afaik browsers throttle setTimeout and setInterval by 1000ms when browser tab is inactive or hidden. So if the timeout is set on the parent window, and user opens Document PIP from it with an avatar in it, then navigates to a different tab or app, these timeouts might get delayed or paused. that's why I've attached all timeouts to the provided document window
Wrapping up #3357