
One thing I've been doing a lot laterly is using custom roll parsing queries, where you present a message box like this:
If someone clicks the Submit button, the code can detect which entry you selected, like so:
startRoll("!{{template:pages}}{{ask=![[?{Are You Sure? This will erase your current character|No,0|Do It!,1}]]}}", (question) => {
But if the user clicks Cancel, I havent been able to figure out if any input is passed to the sheet worker. Is there anything that can be detected here?
The reason I ask is I want to UNDO something if the user cancels (in this case, the attribute change that triggered the button launch). So I want something to happen on a Cancel entry, but I can't figure out if there's a way to make that happen.
While writing this, I figured out an alternative way to do what I wanted, but I'm still curuous about the question here: can you react to the cancel click?