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

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

el
requis
HTMLElement
The target DOM element from which listeners and attributes will be removed.
props
requis
Record<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

Valeur de retour

La valeur retournée par cet util.

Does not return a value. The element is mutated in place.

Usage

Exemples

Extraits de code prêts à coller.

Teardown in a custom directive

typescript