3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-10 05:53:09 +02:00

Merge pull request from SilverfishVR/master

fix api docs Window.prompt() example
This commit is contained in:
Dale Glass 2023-02-18 21:10:45 +01:00 committed by GitHub
commit 7391405058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,10 +112,10 @@ public slots:
* @function Window.prompt * @function Window.prompt
* @param {string} message - The question to display. * @param {string} message - The question to display.
* @param {string} defaultText - The default answer text. * @param {string} defaultText - The default answer text.
* @returns {string} The text that the user entered if they select "OK", otherwise "". * @returns {string} The text that the user entered if they select "OK", otherwise null.
* @example <caption>Ask the user a question requiring a text answer.</caption> * @example <caption>Ask the user a question requiring a text answer.</caption>
* var answer = Window.prompt("Question", "answer"); * var answer = Window.prompt("Question", "answer");
* if (answer === "") { * if (answer === null) {
* print("User canceled"); * print("User canceled");
* } else { * } else {
* print("User answer: " + answer); * print("User answer: " + answer);