Make WordPress Core

Changeset 50535


Ignore:
Timestamp:
03/15/2021 07:49:50 PM (4 years ago)
Author:
ryelle
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/about.php

    r50523 r50535  
    240240
    241241<script>
    242     wp.domReady( function() {
     242    window.addEventListener( 'load', function() {
    243243        var createElement = wp.element.createElement;
    244244        var Fragment = wp.element.Fragment;
Note: See TracChangeset for help on using the changeset viewer.