Interface: IContentHighlightingCardApi
API for use within content highlighting cards to listen for relevant events and interact with content highlighting
Properties
feature
readonlyfeature:IContentHighlightingFeature
The content highlighting feature associated with this content highlighting card
supportedViewerTypes
readonlysupportedViewerTypes:string[]
The viewer types that this content highlighting feature supports
viewerCollection
readonlyviewerCollection:IViewerCollection
The viewer collection that the card is associated with
visible
readonlyvisible:boolean
Whether or not the content highlights for this feature are currently visible
Methods
getContentDescription()
getContentDescription<
QueueItemType,TransformQueueItemType>():IContentDescription<QueueItemType,TransformQueueItemType>
Retrieves the content description for the currently-displayed content in the associated viewer collection
Type Parameters
• QueueItemTypeextendsIQueueItem = IQueueItem
Type of queue item displayed
• TransformQueueItemTypeextendsIQueueItem = IQueueItem
Type of queue item loaded into a viewer instance
Returns
IContentDescription<QueueItemType, TransformQueueItemType>
Content description
getHighlightingApi()
getHighlightingApi(
viewerType):IContentHighlightingApi
Retrieves the current content highlighting API instance (if available) for the content displayed in the provided viewer type
This will return undefined if the content type is ContentType.CollectionError or ContentType.EmptyQueue or if the relevant viewer type does not support content highlighting.
Parameters
• viewerType: string
Viewer type to retrieve the content highlighting API instance for
Returns
The content highlight API instance
getRenderStatus()
getRenderStatus(
viewerType):IContentHighlightingRenderStatus
Retrieves the current render status for the provided viewer type
Parameters
• viewerType: string
Viewer type to retrieve the render status for
Returns
IContentHighlightingRenderStatus
The render status
hide()
hide():
void
Sets the visibility of this feature's content highlights to false
NOTE: This will not change the visiblity of individual highlight sets and highlights
Returns
void
offcontent()
offcontent(
handler):void
Unregisters an event handler that fires when the content currently displayed in the associated viewer collection changes
Parameters
• handler: ContentHighlightingCardApiContentChangeHandler
Event handler
Returns
void
offrender()
offrender(
handler):void
Unregisters an event handler that fires when the content highlighting feature's render function is invoked
Parameters
• handler: ContentHighlightingCardApiRenderHandler
Event handler
Returns
void
offrenderabort()
offrenderabort(
handler):void
Unregisters an event handler that fires when the content highlighting feature's render function invocation is aborted
Parameters
• handler: ContentHighlightingCardApiRenderAbortHandler
Event handler
Returns
void
offrendercomplete()
offrendercomplete(
handler):void
Unregisters an event handler that fires when the content highlighting feature's render function invocation completes
Parameters
• handler: ContentHighlightingCardApiRenderCompleteHandler
Event handler
Returns
void
offrendererror()
offrendererror(
handler):void
Unregisters an event handler that fires when the content highlighting feature's render function invocation fails
Parameters
• handler: ContentHighlightingCardApiRenderErrorHandler
Event handler
Returns
void
offvisiblechange()
offvisiblechange(
handler):void
Unregisters an event handler that fires when the content highlighting feature visibility changes
Parameters
• handler: ContentHighlightingCardApiVisibleChangeHandler
Event handler
Returns
void
oncontent()
oncontent(
handler):void
Registers an event handler that fires when the content currently displayed in the associated viewer collection changes
Parameters
• handler: ContentHighlightingCardApiContentChangeHandler
Event handler
Returns
void
onrender()
onrender(
handler):void
Registers an event handler that fires when the content highlighting feature's render function is invoked
Parameters
• handler: ContentHighlightingCardApiRenderHandler
Event handler
Returns
void
onrenderabort()
onrenderabort(
handler):void
Registers an event handler that fires when the content highlighting feature's render function invocation is aborted
Parameters
• handler: ContentHighlightingCardApiRenderAbortHandler
Event handler
Returns
void
onrendercomplete()
onrendercomplete(
handler):void
Registers an event handler that fires when the content highlighting feature's render function invocation completes
Parameters
• handler: ContentHighlightingCardApiRenderCompleteHandler
Event handler
Returns
void
onrendererror()
onrendererror(
handler):void
Registers an event handler that fires when the content highlighting feature's render function invocation fails
Parameters
• handler: ContentHighlightingCardApiRenderErrorHandler
Event handler
Returns
void
onvisiblechange()
onvisiblechange(
handler):void
Registers an event handler that fires when the content highlighting feature visibility changes
Parameters
• handler: ContentHighlightingCardApiVisibleChangeHandler
Event handler
Returns
void
reload()
reload():
Promise<void>
Reloads this feature's content highlights in the current viewer
This will invalidate the render cache and abort any content highlight renders in other viewer types as well.
Returns
Promise<void>
Promise that resolves when reload is complete
setVisible()
setVisible(
visible):void
Sets the visibility of this feature's content highlights
Parameters
• visible: boolean
New visibility value
Returns
void
show()
show():
void
Sets the visibility of this feature's content highlights to true
NOTE: This will not change the visiblity of individual highlight sets and highlights
Returns
void
toggleVisible()
toggleVisible():
boolean
Toggles the visibility of this feature's content highlights
Returns
boolean
Boolean indicating the new visibility value