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

Removing Injected Scripts from DOM? #78

Closed
jherdman opened this issue Aug 17, 2020 · 3 comments
Closed

Removing Injected Scripts from DOM? #78

jherdman opened this issue Aug 17, 2020 · 3 comments

Comments

@jherdman
Copy link

Upon reading the API it's not clear how to remove injected scripts from the DOM. How does one accomplish this?

@DavidWells
Copy link
Owner

Hey @jherdman

To my knowledge, it's not possible to "unload" a script once it's loaded and executed.

What use case are you trying to achieve with removing a script?

@DavidWells
Copy link
Owner

Going to close this. Let me know if you have any additional information to add

@jherdman
Copy link
Author

Hi David!

I'm a maintainer of ember-metrics. A community member had mentioned that this lib might be a great fit to be the unpinning of our package instead of our own homespun solution.

The use case we have for DOM removal is testing. Though a script may not unload when you remove it from the DOM, the DOM node itself does which is important for clean up and testing — even if this doesn't happen in the real world.

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

No branches or pull requests

2 participants