MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / showToast

Function showToast

static/bootstrap-utils.ts:178–184  ·  view source on GitHub ↗
(elementOrSelector: string | HTMLElement | JQuery, options?: Partial<Toast.Options>)

Source from the content-addressed store, hash-verified

176 * @param options Optional Toast options if a new instance needs to be created
177 */
178export function showToast(elementOrSelector: string | HTMLElement | JQuery, options?: Partial<Toast.Options>): void {
179 const element = getElement(elementOrSelector);
180 if (!element) return;
181
182 const toast = Toast.getInstance(element) || new Toast(element, options);
183 toast.show();
184}
185
186/**
187 * Hide a toast

Callers

nothing calls this directly

Calls 2

getElementFunction · 0.85
showMethod · 0.45

Tested by

no test coverage detected