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
10 changes: 10 additions & 0 deletions src/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ export class Component<T extends HTMLElement = HTMLElement> extends ElementCompo
return this.node.matches(selectors);
}

/**
* Puts the element into
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus focus}.
* @param options - An optional object for controlling aspects of the focusing process.
*/
public focus(options?: FocusOptions): typeof this {
this.node.focus(options);
return this;
}

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