(
elementOrSelector: string | HTMLElement | JQuery,
options?: Partial<Popover.Options>,
)
| 245 | * @throws Error if the element cannot be found |
| 246 | */ |
| 247 | export 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 |
no test coverage detected