You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that using .removeEventListener on my event listeners no longer works because the actual function that is submitted to addEventListener is a function wrapper from Rollbar. Put simply, this doesn't work:
const handler = e => e.target;
// the event listener gets set correctly
node.addEventListener('click', handler, false);
// but I can no longer remove it because this doesn't work, clicking the node still triggers the handler
node.removeEventListener('click', handler, false);
I can see in my debugger that the actual handler is a rollbar wrapped function, and I don't have a way of getting a reference to that function, so I can't pass it to removeEventListener. What's the way out here?
The text was updated successfully, but these errors were encountered:
I've noticed that using
.removeEventListener
on my event listeners no longer works because the actual function that is submitted toaddEventListener
is a function wrapper from Rollbar. Put simply, this doesn't work:I can see in my debugger that the actual handler is a rollbar wrapped function, and I don't have a way of getting a reference to that function, so I can't pass it to
removeEventListener
. What's the way out here?The text was updated successfully, but these errors were encountered: