Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Know which fonts supply emoji glyphs.
Emoji Fonts is easiest to learn by reading the example, changing it, and observing the result.
// A tiny emoji picker
const emojis = ['😀', '🎉', '🚀', '❤️', '👍', '🔥'];
const picker = document.querySelector('#picker');
picker.innerHTML = emojis
.map(e => `<button type="button" aria-label="emoji">${e}</button>`)
.join('');
picker.addEventListener('click', e => {
if (e.target.tagName === 'BUTTON') {
document.querySelector('#input').value += e.target.textContent;
}
});Practice the Emoji Fonts example in a small scratch file, then explain what changed and why.