NSB.MsgBox creates an element called NSB_MsgBox. You can’t define an event for an NSB.MsgBox before it is displayed on the screen: it only gets created when it is called and is destroyed when it is dismissed.
You might be able to do this by catching a click event:
Form1.onclick = function(e){
console.log(e);
}
This would get called whenever the user clicks on the form You would need to look at the e object to see if it’s something which calls NSB.MsgBox.
I have a hunch there might be better way, but I’m not sure what that is.