diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-includes/js/dist/dom-ready.js --- a/wp/wp-includes/js/dist/dom-ready.js Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-includes/js/dist/dom-ready.js Tue Dec 15 13:49:49 2020 +0100 @@ -82,20 +82,35 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 340); +/******/ return __webpack_require__(__webpack_require__.s = 419); /******/ }) /************************************************************************/ /******/ ({ -/***/ 340: +/***/ 419: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return domReady; }); +/** + * @typedef {() => void} Callback + * + * TODO: Remove this typedef and inline `() => void` type. + * + * This typedef is used so that a descriptive type is provided in our + * automatically generated documentation. + * + * An in-line type `() => void` would be preferable, but the generated + * documentation is `null` in that case. + * + * @see https://github.com/WordPress/gutenberg/issues/18045 + */ + /** * Specify a function to execute when the DOM is fully loaded. * - * @param {Function} callback A function to execute after the DOM is ready. + * @param {Callback} callback A function to execute after the DOM is ready. * * @example * ```js @@ -108,18 +123,16 @@ * * @return {void} */ -var domReady = function domReady(callback) { +function domReady(callback) { if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly. document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly. ) { - return callback(); + return void callback(); } // DOMContentLoaded has not fired yet, delay callback until then. document.addEventListener('DOMContentLoaded', callback); -}; - -/* harmony default export */ __webpack_exports__["default"] = (domReady); +} /***/ })