Studio

done

("done", (string) => void): this;

Emitted when the user returns from the dialog.

Returns

this

Handler Function

When the done event is fired, attached handler functions are called with a single argument, null if the dialogue was cancelled, otherwise the text that was entered.

Example

myPrompt.on("done", dialogDone);

function dialogDone(t){
    if (t === null){
        //code to run if the dialogue returned null as a result of it being cancelled
    }
}
Open in new window