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
Removes the toast with the given ID
Parameters:
toastrId object
createToastrOptions
Returns new, empty toastrOptions
@return {CustomType<webnotificationsToastr.toastrOptions>}
Returns: toastrOptions
error
Shows an error toastr with the given message, optional title and options
@param {String} message the message to show @param {String} title the optional title shown above the message @param {Object} options toastrOptions object with additional options @param {Object} toastrId optional id that can be used to clear this specific toastr via clearToastr @param {Function} onClick optional callback function when the toastr is clicked @example
Parameters:
message string title string (optional) options toastrOptions (optional) toastrId object (optional) onClick function (optional)
info
Shows an info toastr with the given message, optional title and options
@param {String} message the message to show @param {String} title the optional title shown above the message @param {Object} options toastrOptions object with additional options @param {Object} toastrId optional id that can be used to clear this specific toastr via clearToastr @param {Function} onClick optional callback function when the toastr is clicked @example
Parameters:
message string title string (optional) options toastrOptions (optional) toastrId object (optional) onClick function (optional)
setGlobalOptions
Sets the given options globally
@param {Object} options toastrOptions
Parameters:
options toastrOptions
success
Shows a success toastr with the given message, optional title and options
@param {String} message the message to show @param {String} title the optional title shown above the message @param {Object} options toastrOptions object with additional options @param {Object} toastrId optional id that can be used to clear this specific toastr via clearToastr @param {Function} onClick optional callback function when the toastr is clicked @example
Parameters:
message string title string (optional) options toastrOptions (optional) toastrId object (optional) onClick function (optional)
warning
Shows a warning toastr with the given message, optional title and options
@param {String} message the message to show @param {String} title the optional title shown above the message @param {Object} options toastrOptions object with additional options @param {Object} toastrId optional id that can be used to clear this specific toastr via clearToastr @param {Function} onClick optional callback function when the toastr is clicked @example
Parameters:
message string title string (optional) options toastrOptions (optional) toastrId object (optional) onClick function (optional)
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