I updated my article on reducing #WebComponent FOUC to include details on how to choose an appropriate timeout. #html #css #javascript dev.to/stuffbreaker...
Post
dev.toReducing FOUC with Web ComponentsLearn practical techniques for reducing the flash of unstyled content (FOUC) as your web components/custom elements are defined to improve your users' experience
If you want, you can delay the start of cross-document view transitions by blocking the renderer until the custom elements are defined. Then the last frame you see is the previous page. After the renderer resumes, the next frame shows the loading page with defined custom elements.
1 repost1 like
I believe github.com/w3c/csswg-dr... could be of use here. I added the Web Components use-case as a comment just now. Feel free to chime in on the issue :)
github.com[css-view-transitions-2] Extend `waitUntil` so that it can delay the start of the View Transition (animating phase) · Issue #13013 · w3c/csswg-draftsIn #9901 we resolved on adding ViewTransition.waitUntil() which delays the view transition finish until the given promise is settled. In WebKit/standards-positions#564 @nt1m brought up the followin...