-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
"the script is ready" doesn't really work #5217
Comments
I think the escape clause here is the very-subtle wording in the definition of "delays the load event":
(this should presumably be updated to in a document tree, or maybe in a shadow-including document tree?) In particular the same "issue" applies to img, style, link, and other things that delay the load event. |
Somewhat related: #5160. |
* Modernize the definitions and usage of various fields associated with script element, e.g. by removing "scare quotes", changing names from verbose things like "the script's type" to just "type", changing flags to booleans, ensuring initial values are defined, etc. Notable field changes: * Rename "the script's script" to "result". This serves as preparation for other specifications, such as import maps, which will expand what that field can contain. * Rename "non-blocking" to "force async" to better communicate its connection to the async="" content attribute and to avoid confusion with the blocking="" content attribute. * Revamp "the script is ready" into three separate concepts: "delaying the load event", "mark as ready", and "steps to run when the result is ready". Fixes #5217, in particular making it so that script elements which are never marked as ready (e.g., <script type="foobar">) don't delay the load event indefinitely. * Un-export "prepare a script". All uses of it in external specs are either monkeypatches or non-normative references. * Rename "prepare a script" to "prepare the script element" to emphasize it's about the `<script>` element, not about the separate script concept. * Rewrite the final of "prepare the script element" from a switch into a series of nested if/else blocks, which better communicates how we can land in the various different script element execution modes. * Rename "execute a script block" to "execute the script element", since "block" is a strange term. * Various other editorial improvements to those two algorithms.
* Modernize the definitions and usage of various fields associated with script element, e.g. by removing "scare quotes", changing names from verbose things like "the script's type" to just "type", changing flags to booleans, ensuring initial values are defined, etc. Notable field changes: * Rename "the script's script" to "result". This serves as preparation for other specifications, such as import maps, which will expand what that field can contain. * Rename "non-blocking" to "force async" to better communicate its connection to the async="" content attribute and to avoid confusion with the blocking="" content attribute. * Revamp "the script is ready" into three separate concepts: "delaying the load event", "mark as ready", and "steps to run when the result is ready". Fixes whatwg#5217, in particular making it so that script elements which are never marked as ready (e.g., <script type="foobar">) don't delay the load event indefinitely. * Un-export "prepare a script". All uses of it in external specs are either monkeypatches or non-normative references. * Rename "prepare a script" to "prepare the script element" to emphasize it's about the `<script>` element, not about the separate script concept. * Rewrite the final of "prepare the script element" from a switch into a series of nested if/else blocks, which better communicates how we can land in the various different script element execution modes. * Rename "execute a script block" to "execute the script element", since "block" is a strange term. * Various other editorial improvements to those two algorithms.
Does not say what it wants to say I think. In particular, I would be very surprised if in
delaysLoadEvent actually ends up delaying the load event.
The text was updated successfully, but these errors were encountered: