Skip to content

Commit

Permalink
update addContextListener code example to ensure that typescript does…
Browse files Browse the repository at this point in the history
…n't think its using the deprecated function signature
  • Loading branch information
kriswest committed Sep 30, 2021
1 parent b9128e1 commit 38556ff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions toolbox/fdc3-workbench/src/fixtures/codeExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ export const codeExamples = {
'fdc3.raiseIntent("ViewChart", context);',
contextListener:
"// any context\n" +
"const listener = fdc3.addContextListener(null, context => { ... });\n" +
"const listener = fdc3.addContextListener(null, context => {\n" +
" //add context handling code here\n" +
"});\n" +
"\n" +
"// listener for a specific type\n" +
"const contactListener = fdc3.addContextListener('fdc3.contact', contact => { ... });",
"const contactListener = fdc3.addContextListener('fdc3.contact', contact => {\n" +
" //add context handling code here\n" +
"});",
intentListener:
"const listener = fdc3.addIntentListener('StartChat', context => {\n" +
" // start chat has been requested by another application\n" +
Expand Down

0 comments on commit 38556ff

Please sign in to comment.