Gets the icon URL for the built-in icon.
This function is used by hwc.getMsgIconUrl and hwc.getAppIconUrl. It is possible to call this function directly, but generally it is easier simply to call hwc.getAppIconUrl or hwc.getMsgIconUrl instead. Those functions handle both cases where there is and isn't a custom icon for the hybrid app or message.
<static> getBuiltInIconUrl( iconIndex, processed ) → {string}
Name | Type | Description |
iconIndex | number | The index of the built-in icon. |
processed | boolean | Whether or not to get the URL of the processed icon (true) or the unprocessed icon (false). |
The URL to the icon.
Type:
string
// Create the image element. var builtInIcon = document.createElement( "img" ); // Set the source of the image to the icon URL. builtInIcon.setAttribute( 'src', hwc.getBuiltInIconUrl(56, false) ); // Add the image element to the page. document.body.appendChild( builtInIcon );