Prevent double marks in IAB without unregistering the eventlistener #2
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.
Hey,
thanks for your inspiring talk today at perfnow.nl! This recommendation came in really handy for me as I am using a SourcePoint but simply was missing out on this opportunity.
From my experience, publishers often already have code listening to that event because they need to process custom vendors, want to trigger reloads, or many other things. I imagine if someone stumbles upon your snippet and just adds the inner code to their existing callback, they might run into issues when unregistering the event handler. That's why I am suggesting this alternative.
On the other side, you could argue that this is the developers responsibility, or that they just could register two event listeners and thus, that this is a workaround for a problem that might not even exits in the first place.
In that case, I am not disappointed in you rejecting this PR. Take it as feedback/heads up in that case (: