I'm not going to go into detail on how to use dojo/on, but I thought it would be neat to share a couple of ways you can extend dojo/on to do some cool stuff you might need for particular situations. Some time back, I had need to be able to toggle the eventlistener for a click event on my map. The first time I clicked the map, I want to do a selection and the second time I clicked the map I wanted to run a different method unrelated to the selection. There are a couple of ways I could have gone about this by using dojo/on#pausable or something. But I decided to just extend dojo/on to do what I needed.
You can click on the Speak! button and get an alert message. Click on the Toggle button and click on Speak! again to get a different message. Click on the One time! button and an alert message will pop up in a second. The delay is optional, so you could change the delay to 100ms if you like. Try and click that same button again and nothing happens.
This is just a quick example of stuff you could do depending on your situation and I thought would be fun to share. You can see more tidbits like this on my blog.
Softwhere Developer at Esri working on cool stuff!
ArcGIS Web Development - https://amzn.to/2EIxTOp
Born and raised in East L.A.