Commit 3cba156
committed
Emoji: Move printing of emoji loader script module from
This removes ~3KB of HTML from the critical rendering path of markup in the `head`, thus marginally improving FCP/LCP in slower connections. It also fixes a Firefox issue with script modules by ensuring the emoji loader script module is printed after the `importmap`.
Existing plugins that disable emoji by unhooking the action as follows will continue to work as expected:
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
Additionally, some obsolete `DOMReady` and `readyCallback` logic was removed. A script module (as it has a deferred execution) only ever executes when the DOM is fully loaded. This means there was no need for a `DOMContentLoaded` event which was removed in [60899], and the remaining ready detection logic can be removed.
Follow-up to [60899].
Developed in #10145.
Props westonruter, wildworks.
Fixes #63842.
Fixes #64076.
git-svn-id: https://develop.svn.wordpress.org/trunk@60902 602fd350-edb4-49c9-b593-d223f7449a82wp_head to wp_print_footer_scripts.1 parent 3a0f401 commit 3cba156
File tree
3 files changed
+9
-23
lines changed- src
- js/_enqueues
- lib
- wp
- wp-includes
3 files changed
+9
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | 425 | | |
433 | 426 | | |
434 | | - | |
435 | | - | |
436 | 427 | | |
437 | 428 | | |
438 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
| 280 | + | |
290 | 281 | | |
291 | 282 | | |
292 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5912 | 5912 | | |
5913 | 5913 | | |
5914 | 5914 | | |
5915 | | - | |
| 5915 | + | |
| 5916 | + | |
| 5917 | + | |
| 5918 | + | |
| 5919 | + | |
5916 | 5920 | | |
5917 | 5921 | | |
5918 | 5922 | | |
| |||
0 commit comments