mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Emoji: Give name to web worker in emoji loader and terminate when finished.
See #58472. Follow-up to [56074], [56095]. Props westonruter, joemcgill. Fixes #58691. git-svn-id: https://develop.svn.wordpress.org/trunk@56119 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
aaebe106ad
commit
12b9023e2a
@ -366,10 +366,11 @@
|
||||
var blob = new Blob( [ workerScript ], {
|
||||
type: 'text/javascript'
|
||||
} );
|
||||
var worker = new Worker( URL.createObjectURL( blob ) );
|
||||
var worker = new Worker( URL.createObjectURL( blob ), { name: 'wpTestEmojiSupports' } );
|
||||
worker.onmessage = function ( event ) {
|
||||
supportTests = event.data;
|
||||
setSessionSupportTests( supportTests );
|
||||
worker.terminate();
|
||||
resolve( supportTests );
|
||||
};
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user