You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This creates an artificial constraints, where you have to make scripts external in order to make them render-blocking.
For example, the following doesn't work:
<scriptblocking="render" async>requestAnimationFrame(()=>{doSomethingOnFirstFrame()});</script><!-- or --><scriptblocking="render" type="module">requestAnimationFrame(()=>{doSomethingOnFirstFrame()});</script>
To make it work properly, the developer has to either put it in an external JS file or use parser-blocking classic scripts, which is an inferior workaround.
This becomes especially cumbersome when dealing with the pagereveal event, as registering to that event has to be done in a render-blocking script.
The proposal is to remove that limitation and allow any inline script to be render-blocking.
The text was updated successfully, but these errors were encountered:
What is the issue with the HTML Standard?
Currently, script can block rendering only if they have a
src
attribute: see https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model:block-rendering.This creates an artificial constraints, where you have to make scripts external in order to make them render-blocking.
For example, the following doesn't work:
To make it work properly, the developer has to either put it in an external JS file or use parser-blocking classic scripts, which is an inferior workaround.
This becomes especially cumbersome when dealing with the
pagereveal
event, as registering to that event has to be done in a render-blocking script.The proposal is to remove that limitation and allow any inline script to be render-blocking.
The text was updated successfully, but these errors were encountered: