# j-IdleTime

> This component emits event ON('idletime', function(is) {}) when the website is in idle. It reacts on mouse, keyboard, touch events or focusing of window. And the component sets Boolean according to th

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 198c71ca25834ba41cfa6b2767e946f052b7f61e4bc0438292f8fe32388eb8a4
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

This component emits event `ON('idletime', function(is) {})` when the website is in idle. It reacts on mouse, keyboard, touch events or focusing of window. And the component sets `Boolean` according to the path with the current idle state.


__Configuration__:

- `count {Number}` in seconds, default: `300` 5 minutes)

__Events__:

- `ON('idletime', function(is))` is emitted if the document is idle (`is=true`) / active (`is=false`)
- `ON('reload', function() {})` is emitted if the document is transformed from invisible to visible state within `config.count` interval

Use it with `<ui-component name="idletime">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<ui-component name="idletime"></ui-component>

<script>
	ON('idletime', function(is) {
		console.log('Is idle?', is);
	});
</script>
```
