Recipes
Custom Events
Module augmentation
As in other sections, module augmentation will be used, we recommend reading it first.
Seyfert allows to load, integrate and execute custom "events" to be called anywhere, for the sake of this example an simple event will be created called ourEvent
.
Overwriting events
If two events have the same name, they will be overwritten.
Integrating
First we need to let know Seyfert typing system that we will have an custom event.
Loading event
This is just here to flex that you don't have to do anything, just put your events in the designated folder in seyfert.config
.
Executing
After running the code, you should see Hello, world!
in the console. That's it!