Skip to content
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

Error on detach when Node created by subcomponent removed using dom api #3178

Closed
btakita opened this issue Jul 5, 2019 · 2 comments
Closed

Comments

@btakita
Copy link
Contributor

btakita commented Jul 5, 2019

This is a demonstration of issue 1 described in #3156 (comment)

To see the error, open the developer console & refresh the page.

The Svelte compiler cannot guarantee that detach will be called on an element attached to the DOM, since an outside script can remove the DOM element before detach is called.

https://svelte.dev/repl/059f8435ba824ac5a87d27060f0b7d66?version=3.6.4

@stale
Copy link

stale bot commented Dec 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@dummdidumm
Copy link
Member

Closing this due to #6910 which silences the error - that said, manual manipulation of the DOM is almost always the wrong solution and can lead to errors like this. Svelte should be in control of manipulating the DOM.

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants