Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Update purejscarousel.3.0.0.js #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Raph33000
Copy link

Adding deepclone for buttons prev and next in destroy function to remove Events Listener.
Without this, events keep being fired even if carousel has been destroyed (and created error if carousel is initialised again)

Adding deepclone for buttons prev and next in destroy function to remove Events Listener.
@vadymshymko
Copy link
Owner

Hello, @Raph33000. Thanks for the feedback and pull request. If there really is a problem with removing the event listener, I think it's better to solve it with removeEventListener. But, it's also important to note that since I used anonymous functions as a callback in addEventListener (I was stupid)), calling removeEventListener without updating addEventListener is not possible. I am not ready to spend time on these corrections yet, but I will gladly accept them from you if you understand what it is about and are ready to make them.

Copy link
Owner

@vadymshymko vadymshymko left a comment

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

2 participants