This class helps manage a group of handles.
Property Overview
Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Name | Type | Summary | Class | |
---|---|---|---|---|
String | more details The name of the class. | more details | Accessor |
Property Details
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
more details Adds a group of handles. | more details | Handles | ||
Boolean | more details Returns true if a group exists for the provided key, false otherwise. | more details | Handles | |
more details Removes a group of handles. | more details | Handles | ||
more details Removes all handles. | more details | Handles |
Method Details
-
add(handles, key)
-
Adds a group of handles.
Parameters:handles WatchHandle|WatchHandle[]|Collection<WatchHandle>An array or collection handles to group.
key *optionalgroup handle key
Example:let handles = new Handles(); handles.add(handle); // added to the default group handles.add([handle1, handle2]); // added to the default group handles.add(handle, "handle-group"); handles.add([handle1, handle2], "other-handle-group");
-
has(key){Boolean}
-
Returns true if a group exists for the provided key, false otherwise.
Parameter:key *group handle key
Returns:Type Description Boolean
-
remove(key)
-
Removes a group of handles.
Parameter:key *optionalA group key or an array or collection of group keys to remove.
Example:let handles = new Handles(); handles.remove(); // removes handles from default group handles.remove("handle-group"); handles.remove("other-handle-group");
-
removeAll()
-
Removes all handles.