webxdc documentation: make function declaration correct JavaScript (#3237)

* webxdc docs: make function declaration correct js

* add 'let'
This commit is contained in:
bjoern
2022-04-20 12:16:40 +02:00
committed by GitHub
parent 8b2b9e1093
commit 7455989729

View File

@@ -54,7 +54,7 @@ and you won't get the update by `setUpdateListener()`.
### setUpdateListener()
```js
window.webxdc.setUpdateListener((update) => {}, serial) -> Promise<void>;
let promise = window.webxdc.setUpdateListener((update) => {}, serial);
```
With `setUpdateListener()` you define a callback that receives the updates