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.
2 parents fcac4a1 + c5481d2 commit 8994eb1Copy full SHA for 8994eb1
src/Component.ts
@@ -98,6 +98,16 @@ export class Component<T extends HTMLElement = HTMLElement> extends ElementCompo
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}.
104
+ * @param options - An optional object for controlling aspects of the focusing process.
105
+ */
106
+ public focus(options?: FocusOptions): typeof this {
107
+ this.node.focus(options);
108
+ return this;
109
+ }
110
+
111
/**
112
* Set style property
113
* @param name Property name
0 commit comments