require(["esri/support/Action"], function(Action) { /* code goes here */ });
Class: esri/support/Action
Inheritance: Action Accessor
Since: ArcGIS API for JavaScript 4.2

Actions used in Popup and LayerList.

See also:

Constructors

new Action(properties)

Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

Adds a CSS class to the action's node.

more details
more detailsAction
String

The name of the class.

more details
more detailsAccessor
String

The name of the ID assigned to this action.

more details
more detailsAction
String

The URL to an image that will be used to represent the action.

more details
more detailsAction
String

The title of the action.

more details
more detailsAction
Boolean

Indicates if the action is visible.

more details
more detailsAction

Property Details

classNameString

Adds a CSS class to the action's node. Can be used in conjunction with the image property or by itself. Any icon font may be used in this property. The Esri Icon Font is automatically made available via the ArcGIS API for JavaScript for you to use in styling custom actions. To use one of these provided icon fonts, you must prefix the class name with esri-. For example, the default zoom-to action in Popup uses the font esri-icon-zoom-in-magnifying-glass.

declaredClassStringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

The name of the ID assigned to this action. This is used for differentiating actions when listening to the trigger-action event.

imageString

The URL to an image that will be used to represent the action. This property will be used as a background image for the node. It may be used in conjunction with the className property or by itself. If neither image nor className are specified, a default icon default icon will display.

titleString

The title of the action.

For popups: When there are fewer than three actions defined in a popup, this text is displayed to the right of the icon or image representing the action. If there are three or more actions in the popup, then this text is used as a tooltip on the action.

For LayerList: The first action is displayed in the layerlist with an icon. The layerlist has a menu that will display all actions with their titles

visibleBoolean

Indicates if the action is visible.

Default Value: true

Method Overview

NameReturn TypeSummaryClass
Action

Creates a deep clone of this object.

more details
more detailsAction

Method Details

clone(){Action}

Creates a deep clone of this object.

Returns:
TypeDescription
ActionA clone of the new Action instance.

API Reference search results

NameTypeModule

There were no match results from your search criteria.