summaryrefslogtreecommitdiffstatshomepage
path: root/tools/local-env/scripts/utils.js
diff options
context:
space:
mode:
authorWeston Ruter <westonruter@git.wordpress.org>2025-06-25 22:36:15 +0000
committerWeston Ruter <westonruter@git.wordpress.org>2025-06-25 22:36:15 +0000
commit6ea383f14783604934af91c60fee9471a40974df (patch)
treefae2a29671a972203dcd16571c1b5b0f8a8c9335 /tools/local-env/scripts/utils.js
parent40bc4f565a871f1ac0eda3111781168133ca06aa (diff)
downloadwordpress-6ea383f14783604934af91c60fee9471a40974df.tar.gz
wordpress-6ea383f14783604934af91c60fee9471a40974df.zip
Twenty Twenty-One: Add nav menu toggle behaviors at `DOMContentLoaded` instead of at the `load` event.
The `load` event (on `window`) fires after all resources on a page have been loaded, including images. This means that on a slow connection, the mobile nav menu button may be rendered yet unresponsive to taps between when it first appears and when the page has fully loaded. This is rectified by switching to the `DOMContentLoaded` event so that the nav menu behaviors are attached as soon as the DOM has fully loaded. Props gernberg, westonruter, sabernhardt. Fixes #63613. git-svn-id: https://develop.svn.wordpress.org/trunk@60352 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'tools/local-env/scripts/utils.js')
0 files changed, 0 insertions, 0 deletions