Skip to content

Commit 7330cef

Browse files
author
Chris Nelson
committed
explain in the README
1 parent 1b4a3f3 commit 7330cef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ To programmatically send events to a LiveState channel, the `sendEvent()` functi
107107

108108
* submit and input events will send the FormData and prevent the default event behaviour.
109109
* click events will send the dataset of the element (any `data-` attributes).
110-
* (more to come)
110+
111+
## Custom Events
112+
113+
Use the `custom-events` attribute to specify a comma separated list of custom events that can be send. For each, a directive will be added with a prefix of `:send`, e. g. for a CustomEvent named `foo` a `:sendfoo` directive will let you send this event to LiveState.
111114

112115
## Adding fallback content and avoiding early renders
113116

0 commit comments

Comments
 (0)