Skip to content

Releases: github/g-emoji-element

v1.2.0

23 Aug 18:47
ae29f13
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.6...v1.2.0

v1.1.6

05 Apr 18:06
9f7ef3c
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.5...v1.1.6

v1.1.5

16 Jul 14:32
19eca66
Compare
Choose a tag to compare
  • Exclude Android Chrome from onLinux check

v1.1.4

03 Jun 20:07
abd5f13
Compare
Choose a tag to compare
  • Convert to TypeScript/remove Flow type support.
  • Package is now type module. UMD build is removed.
  • Fix emoji content getting cleared even when fallback-src isn't present.

v1.1.3

20 Jan 13:15
e020949
Compare
Choose a tag to compare
  • Add type to HTMLElementTagNameMap in typescript declaration file (#23)

v1.1.2...v1.1.3

1.1.1

25 Oct 20:26
v1.1.1
Compare
Choose a tag to compare
  • Update skin tone only when tone attribute exists #20

1.1.0

24 Oct 23:01
db9bf81
Compare
Choose a tag to compare
  • Added skin tone support #18

v1.0.6

12 Sep 11:01
Compare
Choose a tag to compare
  • types(ts): add window declaration abb0eaf
  • Bump eslint-utils from 1.3.1 to 1.4.2 2359d7c

v1.0.5...v1.0.6

v1.0.5

09 Aug 08:15
130543e
Compare
Choose a tag to compare
  • Merge pull request #14 from github/publish-to-gpr-as-well 3cb46fa
  • publish to GPR as a postpublish step 689850f

v1.0.4...v1.0.5

1.0.5

09 Aug 08:15
3cb46fa
Compare
Choose a tag to compare

<g-emoji> element

Backports native emoji characters to browsers that don't support them by replacing the characters with fallback images.

Installation

$ npm install @github/g-emoji-element

Usage

import '@github/g-emoji-element'
<g-emoji fallback-src="t-rex.png" alias="T-Rex">🦖</g-emoji>

If a browser supports emoji, nothing happens. If a browser does not support emoji, a fallback image tag is created:

<g-emoji fallback-src="t-rex.png" alias="T-Rex">
  <img class="emoji" alt="T-Rex" height="20" width="20" src="t-rex.png">
</g-emoji>

Browser support

Browsers without native custom element support require a polyfill.

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.