Web Notifications (Toastr)
(part of package 'Web Notifications')
You can access it in code via: plugins.webnotificationsToastr
Properties
API
clear()
Removes current toasts using animation
clearToastr(toastrId)
Removes the toast with the given ID
Parameters:
{object} toastrId
createToastrOptions()
Returns new, empty toastrOptions
Returns: toastrOptions
error(message,title,options,toastrId,onClick)
Shows an error toastr with the given message, optional title and options
Example:
Parameters:
{string} message The message to show
{string} [title] The optional title shown above the message
{toastrOptions} [options] ToastrOptions object with additional options
{object} [toastrId] ToastrId optional id that can be used to clear this specific toastr via clearToastr
{function} [onClick] OnClick optional callback function when the toastr is clicked
info(message,title,options,toastrId,onClick)
Shows an info toastr with the given message, optional title and options
Example:
Parameters:
{string} message The message to show
{string} [title] The optional title shown above the message
{toastrOptions} [options] ToastrOptions object with additional options
{object} [toastrId] ToastrId optional id that can be used to clear this specific toastr via clearToastr
{function} [onClick] OnClick optional callback function when the toastr is clicked
setGlobalOptions(options)
Sets the given options globally
Parameters:
{toastrOptions} options ToastrOptions
success(message,title,options,toastrId,onClick)
Shows a success toastr with the given message, optional title and options
Example:
Parameters:
{string} message The message to show
{string} [title] The optional title shown above the message
{toastrOptions} [options] ToastrOptions object with additional options
{object} [toastrId] ToastrId optional id that can be used to clear this specific toastr via clearToastr
{function} [onClick] OnClick optional callback function when the toastr is clicked
warning(message,title,options,toastrId,onClick)
Shows a warning toastr with the given message, optional title and options
Example:
Parameters:
{string} message The message to show
{string} [title] The optional title shown above the message
{toastrOptions} [options] ToastrOptions object with additional options
{object} [toastrId] ToastrId optional id that can be used to clear this specific toastr via clearToastr
{function} [onClick] OnClick optional callback function when the toastr is clicked
Types
toastrOptions
scripting type: CustomType<webnotificationsToastr.toastrOptions>
actionButton
If true will show a custom toastr with an additional action
Type: boolean
Default Value: "false"
actionButtonText
When the actionButton is true, set the text to show for the action section; can be an html string
Type: string
closeButton
Type: boolean
closeHtml
Type: string
disableTimeOut
Type: boolean
enableHtml
Type: boolean
extendedTimeOut
Type: int
hideDuration
Type: int
hideEasing
Type: string
hideMethod
Type: string
messageClass
Type: string
newestOnTop
Type: boolean
onActivateTick
Type: boolean
positionClass
Type: string
progressAnimation
Type: string
progressBar
Type: boolean
showDuration
Type: int
showEasing
Type: string
showMethod
Type: string
tapToDismiss
Type: boolean
timeOut
Type: int
titleClass
Type: string
toastClass
Type: string
Last updated