Creating custom events

How can I create custom events in GoJs? Can you also provide some examples for custom events?

First, I hope you have read to get an overview of all of the kinds of events that GoJS supports.

If you are looking to implement an event handler, there are many examples of declaring a Diagram DiagramEvent listener or a Model Changed listener in the samples. There are also many examples of event handlers that are function values of GraphObject or Tool properties.