An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/time-ticker)

# time-ticker

time-ticker is a non-visible custom element that fires an event periodically.

![](https://media.giphy.com/media/Hlb53yZwhKobm/giphy.gif)

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"] }

```