mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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. Fixes #52758. git-svn-id: https://develop.svn.wordpress.org/trunk@50535 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user