Make WordPress Core

Changeset 56074 for trunk/.jshintrc


Ignore:
Timestamp:
06/27/2023 05:22:59 PM (3 years ago)
Author:
westonruter
Message:

Emoji: Optimize emoji loader with sessionStorage, willReadFrequently, and OffscreenCanvas.

  • Use sessionStorage to remember the previous results of calls to browserSupportsEmoji() for 1 week.
  • Optimize reading from canvas by supplying the willReadFrequently option for the 2D context.
  • When OffscreenCanvas is available, offload browserSupportsEmoji() to a web worker to prevent blocking the main thread. This is of primary benefit to Safari which does not yet support willReadFrequently.
  • Remove obsolete support for IE11 since promises are now utilized. Nevertheless, ES3 syntax is maintained and IE11 will simply short-circuit.

Props westonruter, dmsnell, peterwilsoncc, valterlorran, flixos90, spacedmonkey, joemcgill.
Fixes #58472.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.jshintrc

    r56049 r56074  
    2525                "export": false,
    2626                "module": false,
    27                 "require": false
     27                "require": false,
     28                "WorkerGlobalScope": false,
     29                "self": false,
     30                "OffscreenCanvas": false,
     31                "Promise": false
    2832        }
    2933}
Note: See TracChangeset for help on using the changeset viewer.