(rEl: RElement, jsActionMap: Map<string, Set<Element>>)
| 59 | }; |
| 60 | |
| 61 | export const sharedMapFunction = (rEl: RElement, jsActionMap: Map<string, Set<Element>>) => { |
| 62 | const el = rEl as unknown as Element; |
| 63 | let blockName = el.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE) ?? ''; |
| 64 | const blockSet = jsActionMap.get(blockName) ?? new Set<Element>(); |
| 65 | if (!blockSet.has(el)) { |
| 66 | blockSet.add(el); |
| 67 | } |
| 68 | jsActionMap.set(blockName, blockSet); |
| 69 | }; |
| 70 | |
| 71 | export function removeListenersFromBlocks( |
| 72 | blockNames: string[], |
no test coverage detected