Skip to content

Commit

Permalink
Implement UI event dispatcher/listener (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
DogmaDragon authored Mar 8, 2024
1 parent c39c927 commit 3dcba1c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion in-app-manual/plugins/uipluginapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,12 @@ Registers an after function. An after function is called after the render functi
| `component` | `string` | The name of the component to patch. |
| `fn` | `Function` | The after function. It accepts the same arguments as the original render function, plus the result of the original render function, and is expected to return the rendered component. |

Returns `void`.
Returns `void`.

#### `PluginApi.Event`

Allows plugins to listen for Stash's events.

```js
PluginApi.Event.addEventListener("stash:location", (e) => console.log("Page Changed", e.detail.data.location.pathname))
```

0 comments on commit 3dcba1c

Please sign in to comment.