Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ export class Component<T extends HTMLElement = HTMLElement> extends ElementCompo
return new Component<T>(element);
}

/**
* Test whether the element would be selected by the specified
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors CSS selector}, or group of CSS selectors.
* @param selectors
*/
public is(selectors: string): boolean {
return this.node.matches(selectors);
}

/**
* Set style property
* @param name Property name
Expand Down
Loading