@wordpress/dom-ready
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -6,2 +6,11 @@ /** | ||
* | ||
* @example | ||
* ```js | ||
* import domReady from '@wordpress/dom-ready'; | ||
* | ||
* domReady( function() { | ||
* //do something after DOM loads. | ||
* } ); | ||
* ``` | ||
* | ||
* @return {void} | ||
@@ -8,0 +17,0 @@ */ |
@@ -13,2 +13,11 @@ "use strict"; | ||
* | ||
* @example | ||
* ```js | ||
* import domReady from '@wordpress/dom-ready'; | ||
* | ||
* domReady( function() { | ||
* //do something after DOM loads. | ||
* } ); | ||
* ``` | ||
* | ||
* @return {void} | ||
@@ -15,0 +24,0 @@ */ |
{ | ||
"name": "@wordpress/dom-ready", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Execute callback after the DOM is loaded.", | ||
@@ -28,3 +28,3 @@ "author": "The WordPress Contributors", | ||
}, | ||
"gitHead": "80d228669adadb8dfcd24b8421517fed3be2d474" | ||
"gitHead": "1e024a20a20369af7bc9720a676fdd3837a3a105" | ||
} |
@@ -15,5 +15,15 @@ # DOM Ready | ||
### Usage | ||
## API | ||
```JS | ||
<!-- START TOKEN(Autogenerated API docs) --> | ||
### default | ||
[src/index.js#L29-L29](src/index.js#L29-L29) | ||
Specify a function to execute when the DOM is fully loaded. | ||
**Usage** | ||
```js | ||
import domReady from '@wordpress/dom-ready'; | ||
@@ -26,6 +36,17 @@ | ||
**Parameters** | ||
- **callback** `Function`: A function to execute after the DOM is ready. | ||
**Returns** | ||
`void`: | ||
<!-- END TOKEN(Autogenerated API docs) --> | ||
## Browser support | ||
See https://make.wordpress.org/design/handbook/design-guide/browser-support/ | ||
See <https://make.wordpress.org/design/handbook/design-guide/browser-support/> | ||
<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p> |
@@ -6,2 +6,11 @@ /** | ||
* | ||
* @example | ||
* ```js | ||
* import domReady from '@wordpress/dom-ready'; | ||
* | ||
* domReady( function() { | ||
* //do something after DOM loads. | ||
* } ); | ||
* ``` | ||
* | ||
* @return {void} | ||
@@ -8,0 +17,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28177
124
51
1