<digital-clock>
A simple clock component, displaying the current date and time into the local format.
It's possible to set an alarm.
Quick example
<digital-clock></digital-clock>
<audio src="demo/Zen_Temple_Bell.mp3" id="alarm"></audio>
<script>
const clock = document.querySelector('digital-clock');
let now = new Date();
now.setMinutes(now.getMinutes() + 1);
now.setSeconds(0);
clock.alarm = now.toISOString();
clock.addEventListener('clock-alarm', () => {
document.getElementById("alarm").play();
});
</script>
The component is licensed under the ISC License