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

Function initPopover

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

Source from the content-addressed store, hash-verified

245 * @throws Error if the element cannot be found
246 */
247export function initPopover(
248 elementOrSelector: string | HTMLElement | JQuery,
249 options?: Partial<Popover.Options>,
250): Popover {
251 const element = getElement(elementOrSelector);
252 if (!element) throw new Error(`Failed to find element for popover: ${elementOrSelector}`);
253
254 return new Popover(element, options);
255}
256
257/**
258 * Initialize a popover if the element exists, returning null otherwise

Callers 1

updatePopoverContentMethod · 0.85

Calls 1

getElementFunction · 0.85

Tested by

no test coverage detected