-
-
Notifications
You must be signed in to change notification settings - Fork 5
HtmlElementUtility
Tim Rücker edited this page Dec 8, 2018
·
1 revision
A utility class with some static methods that can be used to interact with HTMLElements.
A brief list of all class members with purposes.
public static querySelectByAttribute(selector: string, element: any = document, value: string = null): E | null
calls the querySelector method with the passed selector once with and once without a prefixed data- of the passed element (or document when not passed) and returns the results.
public static querySelectAllByAttribute(selector: string, element: any = document, value: string = null): NodeListOf
See the querySelectByAttribute method. This method does the same, but it uses the querySelectorAll method instead.
Returns the value of the attribute with the name of the passed selector, which is found at the passed element. The attribute of the element can either be prefix with "data-" or not. It is found in both cases
Simply check whether an element is a descendant of another
- Classes
- Decorators
- CustomEvents
- Helpers
- Interfaces
- Polyfills