I recently implemented useWeakReference for addEventListener() in #OpenFL. In the past, it was impossible to support, but modern browsers have a WeakRef object in JavaScript.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef
For the #Haxe C++ target, there's a similar cpp.vm.WeakRef type.
It's pretty cool to set to null, force a garbage collector run, and suddenly, the listeners simply stop getting called. EventDispatcher detects the missing reference, and cleans up after itself automatically, just like in #AdobeAIR.