Modal success message

I know how to set a success message-
$this->setSuccessMessage(“Message …”);Is there a way to make this message modal? i.e. make it stay until dismissed by the user.(… or is there away to change how long the success message remains visible?)
Thanks

You may set the JavaScript property, for example, in global client script:ew.autoHideSuccessMessageDelay = 10000; // Default is 5000ms