Skip to content

Commit

Permalink
Update DesktopAgent.md
Browse files Browse the repository at this point in the history
Clarified the passing of context when adding a listener
  • Loading branch information
openfin-johans authored Dec 6, 2023
1 parent 7de2822 commit 9efc8f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.1/api/ref/DesktopAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ addContextListener(contextType: string | null, handler: ContextHandler): Promise

Adds a listener for incoming context broadcasts from the Desktop Agent (via a User channel or [`fdc3.open`](#open) API call). If the consumer is only interested in a context of a particular type, they can specify that type. If the consumer is able to receive context of any type or will inspect types received, then they can pass `null` as the `contextType` parameter to receive all context types.

Context broadcasts are primarily received from apps that are joined to the same User Channel as the listening application, hence, if the application is not currently joined to a User Channel no broadcasts will be received from channels. If this function is called after the app has already joined a channel and the channel already contains context that would be passed to the context listener, then it will be called immediately with that context.
Context broadcasts are primarily received from apps that are joined to the same User Channel as the listening application, hence, if the application is not currently joined to a User Channel no broadcasts will be received from channels. If this function is called after the app has already joined a channel and the channel already contains context that matches the type of the context listener, then it will be called immediately and the context passed to the handler function. If `null` was passed as the context type for the listener and the channel contains context, then the handler function will be called immediately with the most recent context - regardless of type.

Context may also be received via this listener if the application was launched via a call to [`fdc3.open`](#open), where context was passed as an argument. In order to receive this, applications SHOULD add their context listener as quickly as possible after launch, or an error MAY be returned to the caller and the context may not be delivered. The exact timeout used is set by the Desktop Agent implementation, but MUST be at least 15 seconds.

Expand Down

0 comments on commit 9efc8f0

Please sign in to comment.