author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:52:52 +0200 | |
changeset 22 | 8c2e4d02f4ef |
parent 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1 |
/******/ (() => { // webpackBootstrap |
19 | 2 |
/******/ "use strict"; |
3 |
/******/ // The require scope |
|
4 |
/******/ var __webpack_require__ = {}; |
|
5 |
/******/ |
|
6 |
/************************************************************************/ |
|
7 |
/******/ /* webpack/runtime/define property getters */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
8 |
/******/ (() => { |
19 | 9 |
/******/ // define getter functions for harmony exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
10 |
/******/ __webpack_require__.d = (exports, definition) => { |
19 | 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 |
/******/ } |
|
9 | 16 |
/******/ }; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
17 |
/******/ })(); |
19 | 18 |
/******/ |
19 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
20 |
/******/ (() => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
21 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
22 |
/******/ })(); |
19 | 23 |
/******/ |
9 | 24 |
/************************************************************************/ |
19 | 25 |
var __webpack_exports__ = {}; |
26 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
27 |
/* harmony export */ "default": () => (/* binding */ domReady) |
19 | 28 |
/* harmony export */ }); |
16 | 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 |
||
9 | 43 |
/** |
44 |
* Specify a function to execute when the DOM is fully loaded. |
|
45 |
* |
|
16 | 46 |
* @param {Callback} callback A function to execute after the DOM is ready. |
9 | 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 |
*/ |
|
16 | 59 |
function domReady(callback) { |
18 | 60 |
if (typeof document === 'undefined') { |
61 |
return; |
|
62 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
63 |
if (document.readyState === 'complete' || |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
64 |
// DOMContentLoaded + Images/Styles/etc loaded, so we call directly. |
9 | 65 |
document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly. |
66 |
) { |
|
19 | 67 |
return void callback(); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
68 |
} |
9 | 69 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
70 |
// DOMContentLoaded has not fired yet, delay callback until then. |
9 | 71 |
document.addEventListener('DOMContentLoaded', callback); |
16 | 72 |
} |
9 | 73 |
|
19 | 74 |
(window.wp = window.wp || {}).domReady = __webpack_exports__["default"]; |
75 |
/******/ })() |
|
76 |
; |