blockly > مربّع حوار > setAlert
الدالة square.setAlert()
تحدد الدالة التي سيتم تشغيلها عند استدعاء Blockly.dialog.alert().
Signature:
export declare function setAlert(alertFunction: (p1: string, p2?: () => void) => void): void;
المعلمات
المعلمة |
النوع |
الوصف |
alertFunction |
(p1: السلسلة، p2?: () => باطلة) => فراغ |
الدالة المطلوب تشغيلها. |
المرتجعات:
فراغ
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Defines a custom function to be executed when Blockly's alert dialog is triggered."],["Accepts a function as input, which will handle displaying the alert message and any subsequent actions."],["The provided function receives the alert message and an optional callback function as parameters."],["Returns void, indicating that it doesn't produce a direct output."]]],["The `dialog.setAlert()` function configures the action triggered by `Blockly.dialog.alert()`. It accepts a single parameter, `alertFunction`, which is a function itself. This `alertFunction` takes a string (p1) and an optional function (p2) as inputs. When `Blockly.dialog.alert()` is called, the provided `alertFunction` is executed, enabling custom behavior for alert dialogs. The function returns `void`, meaning it does not return any value.\n"]]