-
Notifications
You must be signed in to change notification settings - Fork 0
.component()
esr360 edited this page Apr 18, 2019
·
11 revisions
Various Synergy Component operations
.component(name, operator, config);| Param | Type | Info |
|---|---|---|
name |
String |
The name of the component of interest |
[operator] |
('find'|'is'|'set'|'unset') |
The operation to apply to matched elements |
[config] |
Object |
The configuration to use when calling the method (learn more) |
- If
operatoris not passed, it will assume to befind - If neither
namenoroperatorare passed, the method will attempt to find all child components of each element in the set of matched elements
Find all child components of each element in the set of matched elements filtered by the
nameparameter
Determine if each element in the set of matched elements is the specified component
Set each element in the set of matched elements as the specified Component
Unset each element in the set of matched elements as the specified Component
.component(name, callback, config);| Param | Type | Info |
|---|---|---|
name |
String |
The name of the component of interest |
[callback] |
Function([HTMLElement] element) |
Function to call on matched components |
[config] |
Object |
The configuration to use when calling the method (learn more) |
A function to call on all child components filtered by the
nameparameter of each element in the set of matched elements, whereelementis the child component