unbindProps
Commons
stable
Remove event listeners and attributes previously applied to a DOM element via bindProps(). Mirrors the bind step for clean teardown in custom directives.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- elrequiredHTMLElement
- The target DOM element from which listeners and attributes will be removed.
- propsrequiredRecord<string, any>
- The same props object that was passed to bindProps(). Event handler keys (onXxx) remove the corresponding listener; other keys remove the attribute.
API
Return value
The value returned by this util.
- Does not return a value. The element is mutated in place.
Usage
Examples
Ready-to-paste usage snippets.
Teardown in a custom directive