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:

ParameterTypeDescription
buttonTextstringThe button label.
callback(evt: MouseEvent) => voidCalled when the button is clicked; the notice is hidden first.

Returns: thisThe notice instance, for chaining.