hoverRemoveListeners

Commons
stable

Removes all hover event listeners (mouseenter, mouseleave, touchstart, touchend, touchcancel) from an IHoverHtmlElement. Should be called in the directive's beforeUnmount hook to prevent memory leaks.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

el
required
IHoverHtmlElement
The element from which to detach all hover listeners. Must extend IHoverHtmlElement (carries the _hover descriptor).

API

Return value

The value returned by this util.

Nothing. All hover event listeners are removed from the element.

Usage

Examples

Ready-to-paste usage snippets.

Teardown in a directive

typescript