getTargetActivator
Commons
stable
Resolves an activator selector to the concrete HTMLElement that should act as the trigger for an overlay (Menu, Tooltip, …). Accepts the special value "parent" to walk up the DOM and skip data-no-activator nodes.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- selectorrequisT
- The activator descriptor. "parent" walks up to the nearest parent that is not marked data-no-activator. A CSS string is queried via querySelector. An [x, y] tuple is passed through for cursor-position overlays.
- vmrequisComponentInternalInstance
- The calling component instance, used as the starting point when selector is "parent".
API
Valeur de retour
La valeur retournée par cet util.
- The resolved HTMLElement, an [x, y] coordinate tuple for cursor overlays, or undefined when the selector is falsy or no matching element is found.
Usage
Exemples
Extraits de code prêts à coller.
Resolve the parent activator