This function gets the URL of the icon for a message object depending on its processed status and whether there are custom icons defined.
<static> getMsgIconUrl( msg ) → {string}
Name | Type | Description |
msg | hwc.Message | The message object |
The url to access the icon.
[/reference/refbody/section/sectiondiv {""})Type:
string
(sectiondiv]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 ); }