Skip to content

Conversation

sfc-gh-dmolkov
Copy link

This PR addresses the issue where ttvc is loaded into an SPA after the window.load has fired.

In the current state that means the observer for the resources never registers.

This is already properly handled in the waitForPageLoad called from visuallyCompleteCalculator, we check the document.readyState and immediately resolve if it is complete. But it was not handled for the networkIdleObservable.

I have added the test that validates this behavior. Without the fix it marks ttvc before the img is ever downloaded.

Obviously there is still a gap if the resource started downloading before ttvc was initialized, but at least this way ttvc will work for future SPA navigations. Without this fix any future resources (e.g. additional bundles) are also not tracked.

@CLAassistant
Copy link

CLAassistant commented Oct 9, 2025

CLA assistant check
All committers have signed the CLA.

@sfc-gh-dmolkov
Copy link
Author

@ajhyndman I finally figured out the bureaucracy with the signing - so I am contributing this back from the work account. Snowflake should have signed the company level CLA as well.

I will close #91 from home (or feel free to close it yourself)

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