Skip to content

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

chaance
Copy link
Member

@chaance chaance commented Apr 29, 2025

Wrapping up #3357

Copy link

changeset-bot bot commented Apr 29, 2025

⚠️ No Changeset found

Latest commit: 3d110fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines +105 to +106
const timerId = globalThis.window.setTimeout(() => setCanRender(true), delayMs);
return () => globalThis.window.clearTimeout(timerId);

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

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

Successfully merging this pull request may close these issues.

2 participants