[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/ -> wp-emoji-loader.js (summary)

(no description)

File Size: 421 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  supportsWorkerOffloading()
  getSessionSupportTests()
  setSessionSupportTests()
  emojiSetsRenderIdentically()
  browserSupportsEmoji()
  testEmojiSupports()
  addScript()

Functions
Functions that are not part of a class:

supportsWorkerOffloading()   X-Ref
Checks whether the browser supports offloading to a Worker.

returns: {boolean}

getSessionSupportTests()   X-Ref
Get support tests from session.

returns: {?SupportTests} Support tests, or null if not set or older than 1 week.

setSessionSupportTests( supportTests )   X-Ref
Persist the supports in session storage.

param: {SupportTests} supportTests Support tests.

emojiSetsRenderIdentically( context, set1, set2 )   X-Ref
Checks if two sets of Emoji characters render the same visually.

This function may be serialized to run in a Worker. Therefore, it cannot refer to variables from the containing
scope. Everything must be passed by parameters.

return: {boolean} True if the two sets render the same.
param: {CanvasRenderingContext2D} context 2D Context.
param: {string} set1 Set of Emoji to test.
param: {string} set2 Set of Emoji to test.

browserSupportsEmoji( context, type, emojiSetsRenderIdentically )   X-Ref
Determines if the browser properly renders Emoji that Twemoji can supplement.

This function may be serialized to run in a Worker. Therefore, it cannot refer to variables from the containing
scope. Everything must be passed by parameters.

return: {boolean} True if the browser can render emoji, false if it cannot.
param: {CanvasRenderingContext2D} context 2D Context.
param: {string} type Whether to test for support of "flag" or "emoji".
param: {Function} emojiSetsRenderIdentically Reference to emojiSetsRenderIdentically function, needed due to minification.

testEmojiSupports( tests, browserSupportsEmoji, emojiSetsRenderIdentically )   X-Ref
Checks emoji support tests.

This function may be serialized to run in a Worker. Therefore, it cannot refer to variables from the containing
scope. Everything must be passed by parameters.

return: {SupportTests} Support tests.
param: {string[]} tests Tests.
param: {Function} browserSupportsEmoji Reference to browserSupportsEmoji function, needed due to minification.
param: {Function} emojiSetsRenderIdentically Reference to emojiSetsRenderIdentically function, needed due to minification.

addScript( src )   X-Ref
Adds a script to the head of the document.

return: {void}
param: {string} src The url where the script is located.



Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref