GitXplorerGitXplorer
w

emo-ji

public
66 stars
7 forks
4 issues

Commits

List of commits on branch master.
Unverified
aa6e6db30fef9e5d3655c23f0f847755f8b67e43

1.0.4

wwbinnssmith committed 9 years ago
Unverified
df6492cc93a2390c894a65467e3850238048e605

1.0.3

wwbinnssmith committed 9 years ago
Unverified
b424230b07ea8f60042d6c410daf9ce4183fc670

Bower's main should be umd build

wwbinnssmith committed 9 years ago
Unverified
eb262487e1eb40e75a4877e77b52a74cccbbbbf1

Added a bower.json so that other people easily can use it in their projects

TTheKnarf committed 9 years ago
Unverified
58c10aad9ce0ddcbcf7a39477e9e99bd519cdcc0

added information about compatability and tables

committed 9 years ago
Unverified
3144e9bc4bff2c4c874063e58647770bbd0231d9

Use existing shadowRoot reference

wwbinnssmith committed 9 years ago

README

The README file for this repository.

emo-ji

An Emoji html custom element that lets you use descriptive names in place of unicode! This module is called emo-ji and that's a recommended tag name, but you can assign it however you like.

Installation

npm install --save emo-ji

Requirements

This is a vanilla web component. It assumes that Custom Elements and the Shadow DOM are available in the runtime. This means it is currently compatible with the following browsers:

Chrome logo Firefox logo Internet Explorer logo Opera logo Safari logo
43+ ✔ Nope ✘ Nope ✘ 32+ ✔ Nope ✘

If you need wider support, you can polyfill web components!

Usage

Bundle with browserify! Webpack works too. If you don't use one of these, use dist/emoji.js and EmojiElement will be set on window. Use that as the prototype when registering your element.

emo-ji does not modify your global environment as a side-effect (like HTML Imports would) and allows you to choose which custom tag name to register on your own! Since HTML imports don't allow namespacing and aliasing imports like CommonJS or ES6 do in JavaScript-land, this module embraces side-effect-free imports and lets you register the element yourself in js. It's only one line, after all.

var emoji = require('emo-ji');

document.registerElement('emo-ji', { prototype: emoji });

... and in your document:

<emo-ji type="unamused"></emo-ji>
<emo-ji type="rabbit"></emo-ji>
<emo-ji type="panda_face"></emo-ji>

<script src="bundle.js"></script>

... where bundle.js is your browserify or webpack bundle.

Screenshots

Credits

@muan's emojilib is pretty great. Any contributions there will only make other emoji things better!

(c) 2015 Will Binns-Smith. Licensed Apache 2.0