Skip to content

Conversation

@gibson042
Copy link
Member

Fixes gh-5377

Summary

Don't try to remove a script element that has already removed itself.

With nearby improvements, +12 bytes to jquery.min.js (+1 gzipped).

Checklist

Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mgol mgol added Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. Manipulation labels Dec 27, 2023
@timmywil timmywil removed the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Jan 8, 2024
@mgol mgol merged commit 937923d into jquery:main Jan 8, 2024
mgol pushed a commit to mgol/jquery that referenced this pull request Jan 8, 2024
Don't try to remove a script element that has already removed itself.

Fixes jquerygh-5377
Closes jquerygh-5378

(cherry-picked from commit 937923d)
@mgol mgol added this to the 3.7.2 milestone Jan 8, 2024
@mgol
Copy link
Member

mgol commented Jan 8, 2024

Landed on main in 937923d and on 3.x-stable in cbc15c9. The 3.x-stable version doesn't include the size optimization since the logic is more complex & it couldn't be directly applied.

gibson042 added a commit to gibson042/jquery that referenced this pull request Jan 12, 2024
mgol pushed a commit that referenced this pull request Jan 12, 2024
mgol pushed a commit that referenced this pull request Jan 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

jQuery .load function errors if loading html with auto-removing script tag

3 participants