检查用户系统是否可以看到特定的表情符号?
有没有办法用javascript检测用户是否可以看到某个表情符号?
我的 mac 上有很多表情符号,但我的同事在她的上看不到,因为她的 mac 操作系统似乎版本较旧。我认为使用其他操作系统的人也会发生类似的事情等等。
例如,当我输出椒盐卷饼表情符号时:
Is there a way to detect with javascript, whether a user can see a certain emoji?
There are quite a few emojis on my mac, that my colleague can't see on hers, because she seems to have an older version of mac OS. I assume that similar things can happen with people who use other OS's altogether etc.
For examples, when I output the pretzel emoji: ???? ...my colleague just sees a three black stripes instead.
Is there a way for me to show the emoji whenever the user has it, but hide it (or show something different) whenever the end user isn't able to see it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我之前在一个项目中使用过 Modernizr 来解决这个问题。 https://modernizr.com/
如果它们本身不支持表情符号,您始终可以使用开源表情符号库以防止将来发生这种情况。 https://github.com/MorbZ/OpenSansEmoji
I've used Modernizr in a project before for this very problem. https://modernizr.com/
If they don't support emoji's natively you could always use an open source emoji library to prevent this from happening in the future. https://github.com/MorbZ/OpenSansEmoji