igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
31 lines • 801 B
JavaScript
export class KeyboardFocusRingController {
get focused() {
return this._focused;
}
constructor(host) {
this.host = host;
this._focused = false;
this.reset = () => {
this._focused = false;
this._host.requestUpdate();
};
this._host = host;
host.addController(this);
}
hostConnected() {
this._host.addEventListener('keyup', this);
}
hostDisconnected() {
this._host.removeEventListener('keyup', this);
}
handleEvent() {
if (!this._focused) {
this._focused = true;
}
this._host.requestUpdate();
}
}
export function addKeyboardFocusRing(host) {
return new KeyboardFocusRingController(host);
}
//# sourceMappingURL=focus-ring.js.map