@@ -49,31 +49,28 @@ export class Component<T extends HTMLElement = HTMLElement> extends BaseComponen
4949 }
5050
5151 /**
52- * Selects a single child component matching the given CSS selector.
53- * This method acts as a shorthand for `Element#querySelector` .
54- *
55- * @param selector A string containing one or more selectors to match.
56- * @returns A `Component<T>` instance wrapping the matched element, or `null` if no match is found.
57- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors
52+ * Get the first component child that matches the specified
53+ * { @link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors CSS selector}, or group of CSS selectors .
54+ * If no matches are found, null is returned.
55+ *
56+ * @param selectors
57+ * @typeParam T Component element type
5858 */
59- public select < T extends HTMLElement > ( selector : string ) : Component < T > | null {
60- const element = this . element . querySelector < T > ( selector ) ;
59+ public select < T extends HTMLElement > ( selectors : string ) : Component < T > | null {
60+ const element = this . element . querySelector < T > ( selectors ) ;
6161 if ( element == null ) return null ;
6262 return new Component < T > ( element ) ;
6363 }
6464
6565 /**
66- * Selects all child components matching the given CSS selector.
67- * This method acts as a shorthand for `Element#querySelectorAll` and returns
68- * an array of `Component<T>` instances wrapping the matched elements.
66+ * Get all child components that match the specified
67+ * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors CSS selector}, or group of CSS selectors.
6968 *
70- * @param selector A string containing one or more selectors to match.
71- * @returns An array of `Component<T>` instances wrapping the matched elements.
72- * If no elements match, an empty array is returned.
73- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors
69+ * @param selectors
70+ * @typeParam T Component element type
7471 */
75- public selectAll < T extends HTMLElement = HTMLElement > ( selector : string ) : Component < T > [ ] {
76- return [ ...this . element . querySelectorAll < T > ( selector ) ] . map ( e => new Component < T > ( e ) ) ;
72+ public selectAll < T extends HTMLElement = HTMLElement > ( selectors : string ) : Component < T > [ ] {
73+ return [ ...this . element . querySelectorAll < T > ( selectors ) ] . map ( e => new Component < T > ( e ) ) ;
7774 }
7875
7976 public override on < K extends keyof HTMLElementEventMap > ( type : K , listener : ( ev : HTMLElementEventMap [ K ] , component : this) => any , options ?: boolean | AddEventListenerOptions ) {
0 commit comments