Newer Version Available
getUtilityState() for Lightning Experience
Returns the state of the current utility as a utilityInfo object.
Arguments
| Name | Type | Description |
|---|---|---|
| callback | function | JavaScript method called upon completion of the method. Returns an object containing information about the utility. |
Sample Code
Response
This method is asynchronous, so it returns its response in a callback method, in a utilityInfo object that contains the following fields.
| Name | Type | Description |
|---|---|---|
| itemLabel | string | The label of the utility. |
| itemIcon | string | The SLDS icon ID of the utility’s icon. |
| panelLabel | string | The label of the utility panel. |
| panelIcon | string | The SLDS icon ID of the utility panel’s icon. |
| height | integer | The height of the utility in pixels. |
| width | integer | The width of the utility in pixels. |
| visible | boolean | Whether or not the utility is visible. |