Skip to content

done

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

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

Emitted when the user returns from the dialog.

this

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.

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
}
}