Closed GeorgeHulpoi closed 3 years ago
From that page, it suggests erring on the side of caution:
It's worth noting that some browser releases have been inconsistent on this, and unless you have specific reasons otherwise, it's probably wise to use the same values used for the call to addEventListener() when calling removeEventListener().
You can remove where removeEventListener uses passive attribute at options.
document.removeEventListener('touchmove', this.PreventDefault.bind(this), this.hasPassiveEvents ? { passive: false } : undefined);
The main reason is that removeEventListener doesn't have that property: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener
And removeEventListener uses the interface EventListenerOptions for options, and it doesn't have property passive as well. https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules_typedoc_node_modules_typescript_lib_lib_dom_d_.eventlisteneroptions.html