Help/About: Run image comparison script after all assets have loaded.

If the callback is called before the images are loaded, the comparison doesn't work. `wp.domReady` uses `DOMContentLoaded`, which does not guarantee that the images are loaded. This switches to use the `load` event, which waits for all resources to load.

Props vladytimy, joyously, sergeybiryukov.
Merges [50535] to the 5.7 branch.
Fixes #52758.


Built from https://develop.svn.wordpress.org/branches/5.7@50536


git-svn-id: http://core.svn.wordpress.org/branches/5.7@50149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryelle 2021-03-15 19:57:05 +00:00
parent c46deb4cb6
commit ef272f47a3
2 changed files with 2 additions and 2 deletions

View File

@ -239,7 +239,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
<script>
wp.domReady( function() {
window.addEventListener( 'load', function() {
var createElement = wp.element.createElement;
var Fragment = wp.element.Fragment;
var render = wp.element.render;

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.7.1-alpha-50526';
$wp_version = '5.7.1-alpha-50536';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.