* Generate a unique ID for the root element * @param root
(root: IntersectionObserverInit["root"])
| 29 | * @param root |
| 30 | */ |
| 31 | function getRootId(root: IntersectionObserverInit["root"]) { |
| 32 | if (!root) return "0"; |
| 33 | if (RootIds.has(root)) return RootIds.get(root); |
| 34 | rootId += 1; |
| 35 | RootIds.set(root, rootId.toString()); |
| 36 | return RootIds.get(root); |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Convert the options to a string Id, based on the values. |
no outgoing calls
no test coverage detected
searching dependent graphs…