ew.autoHideSuccessMessage = true; // this is already the default
ew.autoHideSetMessage = true; // there is no ew.autoHideSetMessage
ew.autoHideFailureMessage = true; // there is no ew.autoHideFailureMessage
To change the auto hide delay for the success message, you may set:
ew.autoHideSuccessMessageDelay = 5000; // 5000 is the default
Client Script is fired when the JavaScripts are loaded. Startup Script is fired when the whole page is loaded.
As arbei mentioned, you can control Toast options from Global > All Pages > Page_Head:
…however, auto-hide only works for success messages. If you want to auto-hide other messages then try something like this in Global > Pages with header/footer > Startup Script: