(container: HTMLElement)
| 196 | private _onTouchEnd = this.onTouchEnd.bind(this); |
| 197 | private _onDocumentLeave = this.onDocumentLeave.bind(this); |
| 198 | init(container: HTMLElement) { |
| 199 | this.container = container; |
| 200 | this.docTarget = container.ownerDocument || null; |
| 201 | const defaultView = |
| 202 | this.docTarget?.defaultView || |
| 203 | (typeof window !== "undefined" ? window : null); |
| 204 | if (!defaultView) return; |
| 205 | this.listenerTarget = defaultView; |
| 206 | this.listenerTarget.addEventListener("mousemove", this._onMouseMove); |
| 207 | this.listenerTarget.addEventListener("touchstart", this._onTouchStart, { |
| 208 | passive: true, |
| 209 | }); |
| 210 | this.listenerTarget.addEventListener("touchmove", this._onTouchMove, { |
| 211 | passive: true, |
| 212 | }); |
| 213 | this.listenerTarget.addEventListener("touchend", this._onTouchEnd); |
| 214 | this.docTarget?.addEventListener("mouseleave", this._onDocumentLeave); |
| 215 | } |
| 216 | dispose() { |
| 217 | if (this.listenerTarget) { |
| 218 | this.listenerTarget.removeEventListener( |
nothing calls this directly
no outgoing calls
no test coverage detected