Skip to content

Commit 1f85a1e

Browse files
committed
upd
1 parent ee88a6e commit 1f85a1e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/events.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,15 @@ You may specify the `capture` option in `whack::evt!`, equivalent to the `captur
5656
whack::evt!(disp=obj, click, || {
5757
//
5858
}, capture = true);
59+
```
60+
61+
## Emitting events
62+
63+
Here is a simple example demonstrating an `.emit()` method call.
64+
65+
```rust
66+
obj.emit(whack::Event::new("event_name", whack::EventOptions {
67+
detail: Rc::new(whack::GenericEvent),
68+
..default()
69+
}));
5970
```

0 commit comments

Comments
 (0)