Currently there is no way to remove previously set onClick (and other) listeners. Every mature programming API has this ability, and there are thousands of use cases that require such feature.
It's easy to add to your API, but it's very hard for advanced programmers to get around this issue.
When listeners are added from code they end up piling up and old ones get called even though they aren't needed.
For example use case see: https://www.wix.com/code/home/forum/community-discussion/remove-onclick-event-set-in-code