Function DocumentListener
- DocumentListener<TKey>(props): JSX.Element
Type Parameters
- TKey extends keyof DocumentEventMap
Parameters
- props: {
capture?: boolean;
on: TKey;
options?: AddEventListenerOptions;
then: ((this, event) => void);
}Optional
capture?: boolean
Optional
options?: AddEventListenerOptions
then: ((this, event) => void)
- (this, event): void
Parameters
- this: Document
- event: DocumentEventMap[TKey]
Returns void
Returns JSX.Element
Attach a document listener to the lifecycle of the current Context. The event listener will be removed when the context is destroyed.