https://github.com/jamesplease/emoji-clock
An emoji clock web component
https://github.com/jamesplease/emoji-clock
Last synced: 3 months ago
JSON representation
An emoji clock web component
- Host: GitHub
- URL: https://github.com/jamesplease/emoji-clock
- Owner: jamesplease
- Created: 2015-12-20T05:35:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-22T00:44:04.000Z (over 9 years ago)
- Last Synced: 2025-03-08T17:15:45.589Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 173 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Emoji Clock
This is a web component for an emoji clock.
### Why?
I was interested to see what the current 'native' web component situation is when no polyfills are used.
### Should I use this?
It's just an experiment; so far I've only tested that it works on Chrome 47.
### Installation
It's not particularly easy to install this thing yet. Check back soon!
### Getting Started
Register your custom element in JavaScript. I recommend using the name `emoji-clock`, but you can
use whatever you'd like.```js
var emojiClock = require('emoji-clock');document.registerElement('emoji-clock', {
prototype: emojiClock
});
```After that, you can use the element in your HTML!
```html
```
### Usage
The web component has a single custom attribute: `time`. The format should be `hour:minute`. Leading zeros
on numbers are optional. For instance, two twenty can be written as `2:20` or `02:20`.Dynamically updating the attribute in JavaScript will update the emoji that is displayed.