@abtasty/widget-utils
Advanced tools
Comparing version 1.7.1 to 1.8.0
{ | ||
"name": "@abtasty/widget-utils", | ||
"version": "1.7.1", | ||
"version": "1.8.0", | ||
"main": "dist/widget-utils.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/widget-utils.esm.js", |
@@ -25,1 +25,13 @@ # Widgets Utils | ||
``` | ||
## Functions | ||
### `domReady(callback)` | ||
Trigger *callback* function once the page Document Object Model (DOM) is ready. | ||
The is useful when you want to manipulate the DOM of the page (someting that you will probably do with a Widget). This function ensures that the DOM is ready and you can safely manipulate it, even if your Widget is injected *before* the document is ready. | ||
### `waitForElement()` | ||
Trigger a *callback* function once a specific element on the page is ready. | ||
Similar to `domReady`. This function will not wait for the DOM to be ready but for a more specific element on the page. For example, the DOM can be ready but the webpage adds an element *after* the page is fully loaded. *Very important if you let the user select an element with an *Element selector* input, see https://abtasty.gitbooks.io/widget/create-widget/configuration-form.html#element-selector*. |
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
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
3615
37