Skip to content

Stealth-empty input to replaceWith leaves content in place #2204

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

Closed
gibson042 opened this issue Apr 13, 2015 · 2 comments
Closed

Stealth-empty input to replaceWith leaves content in place #2204

gibson042 opened this issue Apr 13, 2015 · 2 comments
Assignees
Milestone

Comments

@gibson042
Copy link
Member

e.g., $collection.replaceWith([""]) is a no-op: http://jsfiddle.net/w03Lertu/

@markelog
Copy link
Member

Is that a real use-case? Since in this docs i see -

May be an HTML string, DOM element, array of DOM elements

Since this would not be "array of DOM elements". What is byte-size and perf hit?

@gibson042
Copy link
Member Author

This is necessary for gh-1747, because intercepted HTML can be replaced with an empty string.

markelog added a commit to markelog/jquery that referenced this issue Apr 20, 2015
gibson042 added a commit that referenced this issue Apr 30, 2015
Fixes gh-2204
Ref 642e9a4
Closes gh-1752
Closes gh-2206

(cherry picked from commit 4b27ae1)

Conflicts:
	src/manipulation.js
	test/unit/manipulation.js
@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

3 participants