However, we consider the guide a bit onerous and as a project, will accept a mention in a project README or an 'About' section or footer on a website. The graphics are licensed under the CC-BY 4.0 which has a pretty good guide on best practices for attribution. Attribution RequirementsĪs an open source project, attribution is critical from a legal, practical and motivational perspective in our opinion. The contributing documentation can be found here. If you're still using our V1 API, you can read our legacy documentation here. If security is a major concern, this parsing can be considered the safest option but with a slight performance penalty due to DOM operations that are inevitably costly. If the first argument to twemoji.parse is an HTMLElement, generated image tags will replace emoji that are inside #text nodes only without compromising surrounding nodes or listeners, and completely avoiding the usage of innerHTML. This is unrecommended because this method does not sanitize the string or otherwise prevent malicious code from being executed such sanitization is out of scope. The second kind of parsing is string parsing, explained in the legacy documentation here. Each type of parsing accepts a callback to generate an image source or an options object with parsing info. This is the main parsing utility and has 3 overloads per parsing type.Īlthough there are two kinds of parsing supported by this utility, we recommend you use DOM parsing, explained below. APIįollowing are all the methods exposed in the twemoji namespace. If instead you want to download a specific version, please look at the gh-pages branch, where you will find the built assets for both our latest and older versions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |