Skip to content

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

Closed

Description

@xiaochengh

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.

Activity

  1. smaug---- commented on Jan 21, 2022

    @smaug----
    Collaborator

    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

  2. added
    venue: WHATWG
    on Jan 24, 2022
  3. khushalsagar commented on Aug 11, 2023

    @khushalsagar

    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.

  4. noamr commented on Jan 8, 2024

    @noamr

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

  5. zcorpan commented on Jan 9, 2024

    @zcorpan
    Member

    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.

  6. self-assigned this
    on Jan 9, 2024
  7. zcorpan commented on Jan 16, 2024

    @zcorpan
    Member

    Filed whatwg/html#10068

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

    Suggest positive.

  8. changed the title [-]Request for position: blocking="render" attribute on <link>, <script> and <style>[/-] [+]blocking="render" attribute on <link>, <script> and <style>[/+] on Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

position: positivevenue: WHATWG

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions