-
Notifications
You must be signed in to change notification settings - Fork 180
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 when the script is re-added to the page. #218
Comments
Will look in to it @9brada6, cheers |
I desperately need a solution for this as well. |
This line is problematic as far as I can tell: This line will cause the name "lottie-player" and class to be registered to the |
Please also see this tread and especially this comment I would say: |
Hi, I'm editing a site where user can select and preview predefined templates. The page works by previewing the template, not in an iframe, but in the page itself, via changing the HTML, including all the scripts that comes with the specific page.
The problem is that every time lottie-player is re-added, it triggers a JS error which makes other things in the script not working.
It comes from the fact that lottie-player is added in customElements without verifying if the custom element already exist.
I could get past that by verifying if lottie-player exists in customElements before re-adding it, but I'm just also opening this issue, maybe you will fix it.
To replicate: https://jsfiddle.net/e9df4xz6/
Click on the button, an error appears:
The text was updated successfully, but these errors were encountered: