Handles
Class:
esri/core/Handles
Inheritance: Handles Accessor
Since: ArcGIS API for JavaScript 4.7
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 | The name of the class. more details | more details | Accessor |
Property Details
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className
.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
Adds a group of handles. more details | more details | Handles | ||
Boolean | Returns true if a group exists for the provided key, false otherwise. more details | more details | Handles | |
Removes a group of handles. more details | more details | Handles | ||
Removes all handles. more details | 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.
Loading...