File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,17 @@ _Note that all response objects will supply both the original [obs-websocket][li
78
78
- EventName must exactly match what is defined by the [ ` obs-websocket ` ] [ link-obswebsocket ] plugin.
79
79
80
80
``` js
81
- obs .on (' EventName' , callback (data));
81
+ const callback = (data ) => {
82
+ console .log (data);
83
+ };
84
+
85
+ obs .on (' EventName' , (data ) => callback (data));
82
86
83
87
// The following are additional supported events.
84
- obs .on (' ConnectionOpened' , callback (data));
85
- obs .on (' ConnectionClosed' , callback (data));
86
- obs .on (' AuthenticationSuccess' , callback (data));
87
- obs .on (' AuthenticationFailure' , callback (data));
88
+ obs .on (' ConnectionOpened' , ( data ) => callback (data));
89
+ obs .on (' ConnectionClosed' , ( data ) => callback (data));
90
+ obs .on (' AuthenticationSuccess' , ( data ) => callback (data));
91
+ obs .on (' AuthenticationFailure' , ( data ) => callback (data));
88
92
```
89
93
90
94
#### Handling Errors
You can’t perform that action at this time.
0 commit comments