Skip to content

Commit

Permalink
- remove from the documentation not supported functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
irenelagno committed May 17, 2024
1 parent 851a825 commit 6bca78b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/pages/services/aem-universal-editor/api/events/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ The Universal Editor sends defined events to remote applications. In case the re

### Working with Events

If your business logic requires sending an event to the Universal Editor, you can use the `dispatchEvent` method.
Here's an example of how to dispatch the `aue:ui-select` event:
If your business logic requires sending an event to the Universal Editor, you can use the `triggerEvent` method.
Here's an example of how to dispatch the `aue:ui-viewport-change` event:

```js
useEffect(() => {
(async () => {
const guestConnection = await attach({id: extensionId});
...
await guestConnection.host.remoteApp.dispatchEvent('aue:ui-select', {data: 'some data'});
await guestConnection.host.remoteApp.triggerEvent('aue:ui-viewport-change',
'main',
{
details: {
height: 1024,
width: 768,
}
}
);
...
})();
}, []);
Expand Down

0 comments on commit 6bca78b

Please sign in to comment.