diff --git a/src/Component.ts b/src/Component.ts index 07ef1c0..6c4c981 100644 --- a/src/Component.ts +++ b/src/Component.ts @@ -98,6 +98,16 @@ export class Component 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