getMsgIconUrl( msg ) method

This function gets the URL of the icon for a message object depending on its processed status and whether there are custom icons defined.

Syntax

<static> getMsgIconUrl( msg ) → {string}

Parameters

Name Type Description
msg hwc.Message The message object

Returns

The url to access the icon.

Type:

string

Example

var messages = hwc.getAllMessages();
if( messages.length > 0 )
{
   // Create the image element.
   var messageIcon = document.createElement("img");
   // Set the source of the image to the icon URL.
   messageIcon.setAttribute( 'src', hwc.getMsgIconUrl( messages[0] ) );
   // Add the image element to the page.
   document.body.appendChild( messageIcon );
}

Source

hwc-api.js, line 2368.