Skip to content

Commit 870322c

Browse files
committed
Controller review
1 parent 34510b9 commit 870322c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/runtime-controller-api.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ Before starting this how-to, make sure you have completed the following prerequi
1818

1919
## Listening for Connection Changes
2020

21-
You can listen for runtime connection state changes to know when the app starts or stops running. Add an event listener to respond when the connection state changes.
21+
You can listen for runtime connection state changes to know when the app starts or stops running. To do this, follow the steps below:
2222

23-
Replace your `src/main/index.ts` file with the following:
23+
1. Add an event listener to respond when the connection state changes.
24+
2. Replace your `src/main/index.ts` file with the following:
2425

2526
```typescript
2627
import { IComponent, getStudioProApi } from "@mendix/extensions-api";
@@ -51,9 +52,9 @@ The code uses the:
5152
{{% alert color="info" %}} The function is `async` in order for you to use `await` when executing the preview action.
5253
{{% /alert %}}
5354

54-
The connectionChanged event provides an object with:
55+
The `connectionChanged` event provides an object with:
5556

56-
* isConnected a boolean indicating whether the runtime is currently connected (true) or disconnected (false)
57+
* `isConnected` a boolean indicating whether the runtime is currently connected (true) or disconnected (false)
5758

5859
{{% alert color="info" %}} Take into consideration that you can currently only detect when the runtime connects/disconnects, but before the runtime setup is completed.
5960
{{% /alert %}}

0 commit comments

Comments
 (0)