https://github.com/bahrus/time-ticker
Web Component that fires event periodically
https://github.com/bahrus/time-ticker
Last synced: 3 months ago
JSON representation
Web Component that fires event periodically
- Host: GitHub
- URL: https://github.com/bahrus/time-ticker
- Owner: bahrus
- License: mit
- Created: 2018-11-26T13:09:59.000Z (over 6 years ago)
- Default Branch: baseline
- Last Pushed: 2024-04-12T10:42:12.000Z (about 1 year ago)
- Last Synced: 2024-04-14T15:23:06.284Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 742 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.webcomponents.org/element/time-ticker)
# time-ticker
time-ticker is a non-visible custom element that fires an event periodically.

Uses this [library](https://gist.github.com/jakearchibald/cb03f15670817001b1157e62a076fe95), explained [here](https://youtu.be/MCi6AZMkxcU).
```html
```
## [API Reference](https://cf-sw.bahrus.workers.dev/?href=https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Ftime-ticker%400.0.19%2Fcustom-elements.json&stylesheet=https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fwc-info%2Fsimple-ce-style.css&embedded=false&tags=&ts=2022-02-13T23%3A16%3A52.755Z&tocXSLT=https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fwc-info%2Ftoc.xsl)
## Example 1. Based off [Text Scramble](https://codepen.io/soulwire/pen/mErPAK)
[Demo](https://jsfiddle.net/bahrus/w4527xk0/1/)
time-ticker uses JSON modules, which seem to be wending their way, ever so slowly, into Firefox and Safari.
In the meantime, use the polyfill to accommodate non chromium browsers:
```html
{ "polyfillEnable": ["json-modules"] }
```