mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
Add guides on Getting Started with JS (#4150)
- Get started section added to the JS docs - Small fixes in the JS modules docs
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# js_event_loop {#js_event_loop}
|
||||
# Event Loop module {#js_event_loop}
|
||||
|
||||
# Event Loop module
|
||||
```js
|
||||
let eventLoop = require("event_loop");
|
||||
```
|
||||
@@ -84,7 +83,7 @@ Because we have two extra arguments, if we return anything other than an array
|
||||
of length 2, the arguments will be kept as-is for the next call.
|
||||
|
||||
The first two arguments that get passed to our callback are:
|
||||
- The subscription manager that lets us `.cancel()` our subscription
|
||||
- The subscription manager that lets us `.cancel()` our subscription.
|
||||
- The event item, used for events that have extra data. Timer events do not,
|
||||
they just produce `undefined`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user