Closed hossameh closed 10 months ago
you can pass in an instance of DocumentInterruptSource class with required Interrupts as an array to setInterrupts method.
idle.setInterrupts( [ new DocumentInterruptSource( "keydown wheel scroll click" ) ]);
const customInterrupts = [
new WindowInterruptSource('focus'),
...DEFAULT_INTERRUPTSOURCES,
new DocumentInterruptSource('visibilitychange'),
];
// Set the custom interrupt sources
this.idle.setInterrupts(customInterrupts);
NOTE: Due to limited time constraints and resources, we ask that you please use Stack Overflow or similar to troubleshoot or ask general questions, and not use bug reports to solicit help setting up your app.
Describe the bug How to chang the default interrupts and put my own.
To Reproduce .
Expected behavior
Please tell us about your environment
Additional context