(doc: Document, selector?: string)
| 443 | * Returns a list of all overlays in the DOM even if they are not presented. |
| 444 | */ |
| 445 | export const getOverlays = (doc: Document, selector?: string): HTMLIonOverlayElement[] => { |
| 446 | if (selector === undefined) { |
| 447 | selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast'; |
| 448 | } |
| 449 | return (Array.from(doc.querySelectorAll(selector)) as HTMLIonOverlayElement[]).filter((c) => c.overlayIndex > 0); |
| 450 | }; |
| 451 | |
| 452 | /** |
| 453 | * Returns a list of all presented overlays. |
no test coverage detected