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

First frame after insertion FOUC #34

Open
dy opened this issue Mar 23, 2020 · 2 comments
Open

First frame after insertion FOUC #34

dy opened this issue Mar 23, 2020 · 2 comments

Comments

@dy
Copy link

dy commented Mar 23, 2020

That doesn't seem to be mentioned in readme, but the callback skips at least one frame after the element is inserted to DOM. So for example if there's initializer function for a rule, that adds some styles or content to an element that is added to DOM, the element still appears in DOM unstyled for a single frame, then the rule is hit. That creates FOUC.
I guess that can be prevented by hiding element for that frame in some way...
That is the case for spect. selector-observer doesn't have that issue.

@dy dy changed the title First frame after insertion First frame after insertion FOUC Mar 23, 2020
@naugtur
Copy link
Owner

naugtur commented Dec 12, 2021

Can you share a reproduction case? I'm not sure I understand the problem.

@Erudition
Copy link

set timeout lower than the duration of one frame, maybe? see the config

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

No branches or pull requests

3 participants