We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b03d63 commit a673e7aCopy full SHA for a673e7a
src/Component.ts
@@ -89,6 +89,15 @@ export class Component<T extends HTMLElement = HTMLElement> extends ElementCompo
89
return new Component<T>(element);
90
}
91
92
+ /**
93
+ * Test whether the element would be selected by the specified
94
+ * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors CSS selector}, or group of CSS selectors.
95
+ * @param selectors
96
+ */
97
+ public is(selectors: string): boolean {
98
+ return this.node.matches(selectors);
99
+ }
100
+
101
/**
102
* Puts the element into
103
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus Focus}
0 commit comments