Repository navigation
Conversation
…r a once-event fired. The once-event wrapper only deleted the id but left the element as a key with an empty inner Map, keeping the element from being garbage collected. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
When a listener is registered with an AbortSignal, aborting it removed the DOM listener but left the map entry, keeping the element and the callback alive. Now the entry is removed on abort, unless it was replaced by a later registration under the same id. With an already aborted signal nothing is registered at all. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
remove_event_listener without an element iterates over all elements in the event_listener_map. An element without removeEventListener or without entries stopped the whole loop instead of skipping that element. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
…ning. Replace the outdated comment about Safari not supporting the signal option (supported since Safari 15). Add a test for namespaced ids. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
this.add_event_listener(el, event_type, name, cb, opts) registers an event listener via events.add_event_listener under the id "<pattern name>--<instance uuid>--<name>". destroy() removes all listeners of the instance, but not those of other instances of the same pattern. Note: destroy() is not called automatically when a pattern's element is removed from the DOM. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
destroy() passed a newly bound function to jQuery's off(), which never matched the registered handler, so the handler was never removed. It also did not call super.destroy(), so the pattern stayed registered on the element. Now the handler is registered under an instance specific event namespace and removed via that namespace, without touching other instances' handlers. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.