@serenity-is/corelib / Toastr
Class: Toastr
Table of contents
Constructors
Properties
Methods
- clear
- clearContainer
- clearToast
- createContainer
- error
- getContainer
- info
- notify
- publish
- remove
- removeToast
- subscribe
- success
- warning
Constructors
constructor
• new Toastr(options?)
Parameters
| Name | Type |
|---|---|
options? |
ToastrOptions |
Defined in
Properties
listener
• Private listener: any
Defined in
options
• options: ToastrOptions
Defined in
previousToast
• Private previousToast: string = null
Defined in
toastId
• Private toastId: number = 0
Defined in
Methods
clear
▸ clear(toastElement?, clearOptions?): void
Parameters
| Name | Type |
|---|---|
toastElement? |
HTMLElement |
clearOptions |
Object |
clearOptions.force? |
boolean |
Returns
void
Defined in
clearContainer
▸ Private clearContainer(options?): void
Parameters
| Name | Type |
|---|---|
options |
Partial<ToastrOptions> |
Returns
void
Defined in
clearToast
▸ Private clearToast(toastElement?, options?, clearOptions?): boolean
Parameters
| Name | Type |
|---|---|
toastElement? |
HTMLElement |
options? |
ToastContainerOptions |
clearOptions |
Object |
clearOptions.force? |
boolean |
Returns
boolean
Defined in
createContainer
▸ Private createContainer(options?): HTMLElement
Parameters
| Name | Type |
|---|---|
options |
ToastContainerOptions |
Returns
HTMLElement
Defined in
error
▸ error(message?, title?, opt?): HTMLElement
Parameters
| Name | Type |
|---|---|
message? |
string |
title? |
string |
opt? |
ToastrOptions |
Returns
HTMLElement
Defined in
getContainer
▸ getContainer(options?, create?): HTMLElement
Parameters
| Name | Type | Default value |
|---|---|---|
options? |
ToastContainerOptions |
undefined |
create |
boolean |
false |
Returns
HTMLElement
Defined in
info
▸ info(message?, title?, opt?): HTMLElement
Parameters
| Name | Type |
|---|---|
message? |
string |
title? |
string |
opt? |
ToastrOptions |
Returns
HTMLElement
Defined in
notify
▸ Private notify(map, opt): HTMLElement
Parameters
| Name | Type |
|---|---|
map |
NotifyMap |
opt |
ToastrOptions |
Returns
HTMLElement
Defined in
publish
▸ publish(args): void
Parameters
| Name | Type |
|---|---|
args |
Toastr |
Returns
void
Defined in
remove
▸ remove(toastElement?): void
Parameters
| Name | Type |
|---|---|
toastElement? |
HTMLElement |
Returns
void
Defined in
removeToast
▸ removeToast(toastElement, options?): void
Parameters
| Name | Type |
|---|---|
toastElement |
HTMLElement |
options |
ToastrOptions |
Returns
void
Defined in
subscribe
▸ subscribe(callback): void
Parameters
| Name | Type |
|---|---|
callback |
(response: Toastr) => void |
Returns
void
Defined in
success
▸ success(message?, title?, opt?): HTMLElement
Parameters
| Name | Type |
|---|---|
message? |
string |
title? |
string |
opt? |
ToastrOptions |
Returns
HTMLElement
Defined in
warning
▸ warning(message?, title?, opt?): HTMLElement
Parameters
| Name | Type |
|---|---|
message? |
string |
title? |
string |
opt? |
ToastrOptions |
Returns
HTMLElement