Skip to content

Notice.addButton method

Notice › addButton

Unofficial

Adds an action button to the notice.

Signature:

addButton(buttonText: string, callback: (evt: MouseEvent) => void): this

Parameters:

Parameter Type Description
buttonText string The button label.
callback (evt: MouseEvent) => void Called when the button is clicked; the notice is hidden first.

Returns: thisThe notice instance, for chaining.