@wordpress/dom-ready 3.2.2 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.3.0 (2022-01-27)
6
+
5
7
  ## 3.2.0 (2021-07-21)
6
8
 
7
9
  ## 3.1.0 (2021-05-20)
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Gutenberg
2
2
 
3
- Copyright 2016-2021 by the contributors
3
+ Copyright 2016-2022 by the contributors
4
4
 
5
5
  **License for Contributions (on and after April 15, 2021)**
6
6
 
package/README.md CHANGED
@@ -44,4 +44,10 @@ _Returns_
44
44
 
45
45
  See <https://make.wordpress.org/core/handbook/best-practices/browser-support/>
46
46
 
47
- <br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
47
+ ## Contributing to this package
48
+
49
+ This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
50
+
51
+ To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).
52
+
53
+ <br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
package/build/index.js CHANGED
@@ -43,8 +43,8 @@ function domReady(callback) {
43
43
  if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.
44
44
  document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.
45
45
  ) {
46
- return void callback();
47
- } // DOMContentLoaded has not fired yet, delay callback until then.
46
+ return void callback();
47
+ } // DOMContentLoaded has not fired yet, delay callback until then.
48
48
 
49
49
 
50
50
  document.addEventListener('DOMContentLoaded', callback);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom-ready/src/index.js"],"names":["domReady","callback","document","readyState","addEventListener"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,QAAT,CAAmBC,QAAnB,EAA8B;AAC5C,MAAK,OAAOC,QAAP,KAAoB,WAAzB,EAAuC;AACtC;AACA;;AAED,MACCA,QAAQ,CAACC,UAAT,KAAwB,UAAxB,IAAsC;AACtCD,EAAAA,QAAQ,CAACC,UAAT,KAAwB,aAFzB,CAEuC;AAFvC,IAGE;AACD,aAAO,KAAKF,QAAQ,EAApB;AACA,KAV2C,CAY5C;;;AACAC,EAAAA,QAAQ,CAACE,gBAAT,CAA2B,kBAA3B,EAA+CH,QAA/C;AACA","sourcesContent":["/**\n * @typedef {() => void} Callback\n *\n * TODO: Remove this typedef and inline `() => void` type.\n *\n * This typedef is used so that a descriptive type is provided in our\n * automatically generated documentation.\n *\n * An in-line type `() => void` would be preferable, but the generated\n * documentation is `null` in that case.\n *\n * @see https://github.com/WordPress/gutenberg/issues/18045\n */\n\n/**\n * Specify a function to execute when the DOM is fully loaded.\n *\n * @param {Callback} callback A function to execute after the DOM is ready.\n *\n * @example\n * ```js\n * import domReady from '@wordpress/dom-ready';\n *\n * domReady( function() {\n * \t//do something after DOM loads.\n * } );\n * ```\n *\n * @return {void}\n */\nexport default function domReady( callback ) {\n\tif ( typeof document === 'undefined' ) {\n\t\treturn;\n\t}\n\n\tif (\n\t\tdocument.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.\n\t\tdocument.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.\n\t) {\n\t\treturn void callback();\n\t}\n\n\t// DOMContentLoaded has not fired yet, delay callback until then.\n\tdocument.addEventListener( 'DOMContentLoaded', callback );\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/dom-ready/src/index.js"],"names":["domReady","callback","document","readyState","addEventListener"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,QAAT,CAAmBC,QAAnB,EAA8B;AAC5C,MAAK,OAAOC,QAAP,KAAoB,WAAzB,EAAuC;AACtC;AACA;;AAED,MACCA,QAAQ,CAACC,UAAT,KAAwB,UAAxB,IAAsC;AACtCD,EAAAA,QAAQ,CAACC,UAAT,KAAwB,aAFzB,CAEuC;AAFvC,IAGE;AACD,WAAO,KAAKF,QAAQ,EAApB;AACA,GAV2C,CAY5C;;;AACAC,EAAAA,QAAQ,CAACE,gBAAT,CAA2B,kBAA3B,EAA+CH,QAA/C;AACA","sourcesContent":["/**\n * @typedef {() => void} Callback\n *\n * TODO: Remove this typedef and inline `() => void` type.\n *\n * This typedef is used so that a descriptive type is provided in our\n * automatically generated documentation.\n *\n * An in-line type `() => void` would be preferable, but the generated\n * documentation is `null` in that case.\n *\n * @see https://github.com/WordPress/gutenberg/issues/18045\n */\n\n/**\n * Specify a function to execute when the DOM is fully loaded.\n *\n * @param {Callback} callback A function to execute after the DOM is ready.\n *\n * @example\n * ```js\n * import domReady from '@wordpress/dom-ready';\n *\n * domReady( function() {\n * \t//do something after DOM loads.\n * } );\n * ```\n *\n * @return {void}\n */\nexport default function domReady( callback ) {\n\tif ( typeof document === 'undefined' ) {\n\t\treturn;\n\t}\n\n\tif (\n\t\tdocument.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.\n\t\tdocument.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.\n\t) {\n\t\treturn void callback();\n\t}\n\n\t// DOMContentLoaded has not fired yet, delay callback until then.\n\tdocument.addEventListener( 'DOMContentLoaded', callback );\n}\n"]}
@@ -36,8 +36,8 @@ export default function domReady(callback) {
36
36
  if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.
37
37
  document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.
38
38
  ) {
39
- return void callback();
40
- } // DOMContentLoaded has not fired yet, delay callback until then.
39
+ return void callback();
40
+ } // DOMContentLoaded has not fired yet, delay callback until then.
41
41
 
42
42
 
43
43
  document.addEventListener('DOMContentLoaded', callback);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom-ready/src/index.js"],"names":["domReady","callback","document","readyState","addEventListener"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,QAAT,CAAmBC,QAAnB,EAA8B;AAC5C,MAAK,OAAOC,QAAP,KAAoB,WAAzB,EAAuC;AACtC;AACA;;AAED,MACCA,QAAQ,CAACC,UAAT,KAAwB,UAAxB,IAAsC;AACtCD,EAAAA,QAAQ,CAACC,UAAT,KAAwB,aAFzB,CAEuC;AAFvC,IAGE;AACD,aAAO,KAAKF,QAAQ,EAApB;AACA,KAV2C,CAY5C;;;AACAC,EAAAA,QAAQ,CAACE,gBAAT,CAA2B,kBAA3B,EAA+CH,QAA/C;AACA","sourcesContent":["/**\n * @typedef {() => void} Callback\n *\n * TODO: Remove this typedef and inline `() => void` type.\n *\n * This typedef is used so that a descriptive type is provided in our\n * automatically generated documentation.\n *\n * An in-line type `() => void` would be preferable, but the generated\n * documentation is `null` in that case.\n *\n * @see https://github.com/WordPress/gutenberg/issues/18045\n */\n\n/**\n * Specify a function to execute when the DOM is fully loaded.\n *\n * @param {Callback} callback A function to execute after the DOM is ready.\n *\n * @example\n * ```js\n * import domReady from '@wordpress/dom-ready';\n *\n * domReady( function() {\n * \t//do something after DOM loads.\n * } );\n * ```\n *\n * @return {void}\n */\nexport default function domReady( callback ) {\n\tif ( typeof document === 'undefined' ) {\n\t\treturn;\n\t}\n\n\tif (\n\t\tdocument.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.\n\t\tdocument.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.\n\t) {\n\t\treturn void callback();\n\t}\n\n\t// DOMContentLoaded has not fired yet, delay callback until then.\n\tdocument.addEventListener( 'DOMContentLoaded', callback );\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/dom-ready/src/index.js"],"names":["domReady","callback","document","readyState","addEventListener"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,QAAT,CAAmBC,QAAnB,EAA8B;AAC5C,MAAK,OAAOC,QAAP,KAAoB,WAAzB,EAAuC;AACtC;AACA;;AAED,MACCA,QAAQ,CAACC,UAAT,KAAwB,UAAxB,IAAsC;AACtCD,EAAAA,QAAQ,CAACC,UAAT,KAAwB,aAFzB,CAEuC;AAFvC,IAGE;AACD,WAAO,KAAKF,QAAQ,EAApB;AACA,GAV2C,CAY5C;;;AACAC,EAAAA,QAAQ,CAACE,gBAAT,CAA2B,kBAA3B,EAA+CH,QAA/C;AACA","sourcesContent":["/**\n * @typedef {() => void} Callback\n *\n * TODO: Remove this typedef and inline `() => void` type.\n *\n * This typedef is used so that a descriptive type is provided in our\n * automatically generated documentation.\n *\n * An in-line type `() => void` would be preferable, but the generated\n * documentation is `null` in that case.\n *\n * @see https://github.com/WordPress/gutenberg/issues/18045\n */\n\n/**\n * Specify a function to execute when the DOM is fully loaded.\n *\n * @param {Callback} callback A function to execute after the DOM is ready.\n *\n * @example\n * ```js\n * import domReady from '@wordpress/dom-ready';\n *\n * domReady( function() {\n * \t//do something after DOM loads.\n * } );\n * ```\n *\n * @return {void}\n */\nexport default function domReady( callback ) {\n\tif ( typeof document === 'undefined' ) {\n\t\treturn;\n\t}\n\n\tif (\n\t\tdocument.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.\n\t\tdocument.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.\n\t) {\n\t\treturn void callback();\n\t}\n\n\t// DOMContentLoaded has not fired yet, delay callback until then.\n\tdocument.addEventListener( 'DOMContentLoaded', callback );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dom-ready",
3
- "version": "3.2.2",
3
+ "version": "3.3.1",
4
4
  "description": "Execute callback after the DOM is loaded.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,10 +27,10 @@
27
27
  "types": "build-types",
28
28
  "sideEffects": false,
29
29
  "dependencies": {
30
- "@babel/runtime": "^7.13.10"
30
+ "@babel/runtime": "^7.16.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "8f7f052bc04e3f4eb50f479ced14be1489b9fa79"
35
+ "gitHead": "2e4922861e49f5a090f9dc52056165092cfba163"
36
36
  }