(document: Document)
| 200 | * the session's query API uses against its mutable document. |
| 201 | */ |
| 202 | export function buildRoots(document: Document): HyperFramesElement[] { |
| 203 | const body = document.body; |
| 204 | const roots: HyperFramesElement[] = []; |
| 205 | const animationIdsByHfId = buildAnimationIdMap(document); |
| 206 | if (body) { |
| 207 | for (const child of Array.from(body.children)) { |
| 208 | const built = buildElement(child, "", animationIdsByHfId); |
| 209 | if (built) roots.push(built); |
| 210 | } |
| 211 | } |
| 212 | return roots; |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Parse an HTML string into the SDK document model. |
no test coverage detected