Skip to content

Clarify: What should happen on repeated listener addition for the same contextType/intent #1390

Open
@kemerava

Description

@kemerava

Question Area

  • App Directory
  • API
  • Context Data
  • Intents
  • Use Cases
  • Other

Question

What should happen in the situation where for example app does:
await fdc3.addContextListener('fdc3.contact', (contact, metadata) => {... });
await fdc3.addContextListener('fdc3.contact', contact => { ... });
Or some different handler?

I see 3 possible options (in no particular order):

  1. Override the previous handler and keep the last one
  2. Keep and trigger both handlers (potential conflicts?)
  3. Throw an error and keep the original

Does the standard have any ruling on this, I was not able to find on the docs (please, let me know if I missed it)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiFDC3 API Working GroupquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions