Announcements

Description

This JS API provides you access to announcements. Access methods on this object:

productFruits.api.announcementsV2

Methods

 

attachNewsWidgetToElement(htmlElementInstance)

Attaches the newsfeed widget to a custom element. The parameter must be an HTML element instance, do not pass a CSS selector.


listen(event, callback)

Listens to an event that occurs related to announcements. See the next section to get event names.

Events

 

newsfeed-unread-count-changed

Data 
- count
- listCheckedAt

Fired when newsfeed unread items count changed. Use this to show badge of unread items in your custom newsfeed launcher button.

Was this article helpful?