getTarget
Commons
stable
Resolves a CSS selector string or a Vue component instance / HTMLElement reference to the underlying HTMLElement. Returns null when no match is found in the document.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- elrequisComponentPublicInstance | HTMLElement | string | undefined
- A CSS selector string, a Vue component instance, or an HTMLElement. When a string is provided, document.querySelector is used to locate the element.
API
Valeur de retour
La valeur retournée par cet util.
- The resolved HTMLElement, or null when the selector yields no result or the input is undefined.
Usage
Exemples
Extraits de code prêts à coller.
Resolve by selector and by ref