Memento JavaScript Library: Difference between revisions

Line 451: Line 451:
:; text(string): Sets the main text content of the dialog. Accepts a string parameter that represents the primary message or content of the dialog.
:; text(string): Sets the main text content of the dialog. Accepts a string parameter that represents the primary message or content of the dialog.
:; view(ui object): Sets a custom view for the dialog. Accepts a [[Memento_JavaScript_UI|UI object]] that represents the custom view to be displayed within the dialog.
:; view(ui object): Sets a custom view for the dialog. Accepts a [[Memento_JavaScript_UI|UI object]] that represents the custom view to be displayed within the dialog.
:; positiveButton(text, function()): Configures the positive button of the dialog. Accepts two parameters: the text to be displayed on the button and the function to be executed when the button is clicked.
:; negativeButton(text, function()): Configures the negative button of the dialog. Accepts two parameters: the text to be displayed on the button and the function to be executed when the button is clicked.
:; neutralButton(text, function()): Configures the neutral button of the dialog. Accepts two parameters: the text to be displayed on the button and the function to be executed when the button is clicked.
:; autoDismiss(bool): Sets whether the dialog should automatically dismiss when a button is clicked. Accepts a boolean parameter. If autoDismiss is set to false, the dialog will only close when a button function returns true.
:; show(): Displays the configured dialog to the user.


=== Object ''Intent'' ===
=== Object ''Intent'' ===