ulQuerySelector
ulQuerySelector is a JavaScript utility function that extends the native DOM query capabilities. It provides a single API to locate elements and can search across the document's light DOM and, optionally, its shadow DOM.
Usage: ulQuerySelector(root, selector, options). The root can be a Document, Element, or ShadowRoot; the selector is
Return value: By default, it returns the first matching Element or null. If options.all is true, it
Rationale and scope: ulQuerySelector is not part of the official DOM API. It is typically provided by
Examples: ulQuerySelector(document, '#main'); ulQuerySelector(document, '.button', { all: true, includeShadow: true });
Limitations: Performance depends on implementation; cross-browser support varies. It is not standardized, so compatibility and behavior