* True when an element lives at the top-level (canonical) scope — i.e. its * scopedId equals its bare id because no ancestor opens a sub-composition * boundary. This mirrors document.ts's scopedId construction (childPrefix only * changes at isNewHostBoundary elements) without rebuilding the snaps
(el: Element)
| 48 | * changes at isNewHostBoundary elements) without rebuilding the snapshot tree. |
| 49 | */ |
| 50 | function isCanonicalScope(el: Element): boolean { |
| 51 | for (let cur = el.parentElement; cur; cur = cur.parentElement) { |
| 52 | if (isNewHostBoundary(cur)) return false; |
| 53 | } |
| 54 | return true; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Resolve a bare or scoped hf-id to its DOM element. |
no test coverage detected