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

Removing blocking=render from "implicitly render-blocking" elements unblocks rendering #7856

Closed
xiaochengh opened this issue Apr 25, 2022 · 2 comments · Fixed by #7857
Closed

Comments

@xiaochengh
Copy link
Contributor

xiaochengh commented Apr 25, 2022

We currently have some elements that are "implicitly render-blocking" (not a formally spec-ed term), namely, parser-inserted stylesheet link elements, parser-inserted style elements and synchronous scripts. For backward compatibility, we block rendering for them even if they do not carry the blocking=render attribute.

The current spec also says:

An element is render-blocking if its blocking tokens set contains "render".

Whenever a render-blocking element el becomes browsing-context disconnected, or el's blocking attribute's value is changed so that el is no longer render-blocking, then unblock rendering on el.

This means, e.g., if we have a parser-inserted <link blocking=render rel=stylesheet> and we remove blocking=render from it while it's still loading, we should unblock rendering for it. This is not a desired behavior.

I'll put up a PR to fix it.

@domenic

@domenic
Copy link
Member

domenic commented Apr 25, 2022

This is wrong and breaks backward compatibility.

I'm not sure if it breaks backward compatibility. A page used a new feature (blocking=render) and got a new behavior (dynamic render-blockingness that can change over time).

Now, it might be the case that that new behavior is not desired. But I don't think it's a compat issue.

Do you agree?

@xiaochengh
Copy link
Contributor Author

That makes sense. I'll update the issue description.

domenic pushed a commit that referenced this issue Apr 27, 2022
In particular, after this change, removing blocking="render" will no longer unblock rendering for implicitly render-blocking elements, such as parser-created stylesheet <link>s.

Closes #7856.
mfreed7 pushed a commit to mfreed7/html that referenced this issue Jun 3, 2022
In particular, after this change, removing blocking="render" will no longer unblock rendering for implicitly render-blocking elements, such as parser-created stylesheet <link>s.

Closes whatwg#7856.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants