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.
.is
2 parents 439aa2a + 2025153 commit fcac4a1Copy full SHA for fcac4a1
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
* Set style property
103
* @param name Property name
0 commit comments