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

blocking="render" attribute on <link>, <script> and <style> #608

Closed
xiaochengh opened this issue Jan 14, 2022 · 5 comments
Closed

blocking="render" attribute on <link>, <script> and <style> #608

xiaochengh opened this issue Jan 14, 2022 · 5 comments

Comments

@xiaochengh
Copy link

Request for Mozilla Position on an Emerging Web Specification

Other information

This proposal also includes the standardization of a general render-blocking mechanism, which will standardize the existing stylesheet loading behaviors and support the proposed attribute. The proposed behavior slightly differs from Firefox's current behavior: the proposal does not allow requestAnimationFrame() callbacks to fire until all render-blocking stylesheets are loaded, while Firefox currently allows it.

@smaug----
Copy link
Collaborator

smaug---- commented Jan 21, 2022

Well, UA can always stop the blocking. Otherwise there would be security/privacy issues.
But yes, we could stop calling rAF. Though, need to test how resize (and other) events behave in other implementation while rendering is blocked.

I think in general the idea is quite reasonable.
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1751383 just in case we want to implement this.

@emilio

@khushalsagar
Copy link

But yes, we could stop calling rAF. Though, need to test how resize (and other) events behave in other implementation while rendering is blocked.

@smaug---- can you clarify the question. Did you mean the impact of resizing the window? As per the spec text here there's no rendering opportunities while we're blocked. So no events which happen during the rendering lifecycle run.

@noamr
Copy link

noamr commented Jan 8, 2024

Intending to amend the current spec for render-blocking scripts to also include inline scripts, see whatwg/html#10035

@zcorpan
Copy link
Member

zcorpan commented Jan 9, 2024

I think this is reasonable and useful. My main concern is that it might be a bit too easy to block rendering on a defer (or module which is defer by default) script, and thus block until the timeout hits or until the full document is parsed. I'll file a spec issue.

@zcorpan
Copy link
Member

zcorpan commented Jan 16, 2024

Filed whatwg/html#10068

I think that issue can be resolved without changes to how the feature works.

Suggest positive.

@zcorpan zcorpan changed the title Request for position: blocking="render" attribute on <link>, <script> and <style> blocking="render" attribute on <link>, <script> and <style> Jan 19, 2024
@zcorpan zcorpan closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants