Skip to content

Remove connectedness check in script post-connection steps #11543

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

domfarolino
Copy link
Member

@domfarolino domfarolino commented Aug 7, 2025

Removing the PR template since this doesn't impact behavior. In whatwg/dom@b31d333, we decided that the post-connection steps should have a connectedness pre-condition, so that post-connection steps themselves didn't have to check this manually, which feels redundant.

However, this didn't quite make it over to HTML when I wrote the script post-connection steps, as there is a connectedness check and an detailed example about how an earlier-inserted script can remove a later-inserted script. It just so happens that the connectedness check in the script element's isn't actually redundant though, because this algorithm is called from the "children changed steps" and "attribute change steps", without connectedness pre-conditions.

This PR simplifies things and keeps the post-connection steps more true to its name, by making all of its callsites have a connectedness pre-condition, and removing the weird check from the post-connection steps.


/scripting.html ( diff )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant