PageSourceSearch

https://www.cimmyt.org/wp-includes/js/dist/dom-ready.js?ver=5b9fa8df0892dc9a7c41

js cimmyt.org collected 2026-10-01 09:00:13 UTC 2,464 bytes, 76 lines download raw bytes

1/******/ (() => { // webpackBootstrap
2/******/ 	"use strict";
3/******/ 	// The require scope
4/******/ 	var __webpack_require__ = {};
5/******/ 	
6/************************************************************************/
7/******/ 	/* webpack/runtime/define property getters */
8/******/ 	(() => {
9/******/ 		// define getter functions for harmony exports
10/******/ 		__webpack_require__.d = (exports, definition) => {
11/******/ 			for(var key in definition) {
12/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
14/******/ 				}
15/******/ 			}
16/******/ 		};
17/******/ 	})();
18/******/ 	
19/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
20/******/ 	(() => {
21/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
22/******/ 	})();
23/******/ 	
24/************************************************************************/
25var __webpack_exports__ = {};
26/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27/* harmony export */   "default": () => (/* binding */ domReady)
28/* harmony export */ });
29/**
30 * @typedef {() => void} Callback
31 *
32 * TODO: Remove this typedef and inline `() => void` type.
33 *
34 * This typedef is used so that a descriptive type is provided in our
35 * automatically generated documentation.
36 *
37 * An in-line type `() => void` would be preferable, but the generated
38 * documentation is `null` in that case.
39 *
40 * @see https://github.com/WordPress/gutenberg/issues/18045
41 */
42
43/**
44 * Specify a function to execute when the DOM is fully loaded.
45 *
46 * @param {Callback} callback A function to execute after the DOM is ready.
47 *
48 * @example
49 * ```js
50 * import domReady from '@wordpress/dom-ready';
51 *
52 * domReady( function() {
53 * 	//do something after DOM loads.
54 * } );
55 * ```
56 *
57 * @return {void}
58 */
59function domReady(callback) {
60  if (typeof document === 'undefined') {
61    return;
62  }
63  if (document.readyState === 'complete' ||
64  // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.
65  document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.
66  ) {
67    return void callback();
68  }
69
70  // DOMContentLoaded has not fired yet, delay callback until then.
71  document.addEventListener('DOMContentLoaded', callback);
72}
73
74(window.wp = window.wp || {}).domReady = __webpack_exports__["default"];
75/******/ })()
76;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.