(doc: Document)
| 189 | } |
| 190 | |
| 191 | function extractDuration(doc: Document): number | null { |
| 192 | const root = findRoot(doc) ?? doc.body; |
| 193 | const dur = root?.getAttribute("data-duration"); |
| 194 | return dur ? parseFloat(dur) : null; |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * Build the element tree from an already-parsed (hf-id-stamped) linkedom Document. |
no test coverage detected