Skip to main content

InjectHotkeyOptions

还没翻译译自英文(tanstack.com)本页 8 段都还没译

Defined in: injectHotkey.ts:16

Extends

  • Omit<HotkeyOptions, "target">

Properties

target?

optional target?: Document | Window | HTMLElement | null;

Defined in: injectHotkey.ts:24

The DOM element to attach the event listener to. Can be a direct DOM element, an accessor (for reactive targets that become available after mount), or null. Defaults to document. When using scoped targets, pass an accessor: () => ({ target: elementSignal() }) so the hotkey waits for the element to be attached before registering.