You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,12 @@ Component elements are denoted by a `data-component` attribute, the value of whi
49
49
50
50
**options**: _(Optional)_ - An arbitrary value, typically an object, used by the component. This could be a configuration for another JS library, values used for calculating styles, etc. This is passed to the wrapped function as the `options` property.
51
51
52
-
**load**: _(Optional)_ - Accepts `false`, array, or a callback. _Default is a `domContentLoaded` callback_.
53
-
54
-
*`false` will disable loading and instruct `componentProvider` to return the provider function
55
-
* An array, in the format of `[HTMLElement, event]`, will listen on `HTMLElement` for `event` (e.g., `[window, 'load']`)
56
-
* A callback that accepts a function and contains the logic to call the function
52
+
**load**: _(Optional)_ - _Default is a `DOMContentLoaded` handler_.
57
53
54
+
*`false` - prevents execution and instructs `componentProvider` to return the provider function
55
+
*`true` - Adds the provider function call in place so it is executed as soon as the parent script is parsed and loaded.
56
+
*`array` - `[HTMLElement, event]` - Adds the provider function as a callback for `event` on `HTMLElement` (e.g., `[window, 'load']`).
57
+
*`handler` - A function that accepts a callback and contains the logic to call it.
58
58
### Component Properties
59
59
60
60
Components receive an object of component properties as their only argument. These are based on the config and are included automatically by the framework.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "js-component-framework",
3
-
"version": "3.1.0",
3
+
"version": "3.2.0",
4
4
"description": "A framework for configuring a JavaScript component and attaching it to a DOM element or collection of DOM elements, simplifying organization of DOM interactions on your website.",
0 commit comments