(iframe: HTMLIFrameElement, options: Options)
| 35 | } |
| 36 | |
| 37 | async function cloneIFrameElement(iframe: HTMLIFrameElement, options: Options) { |
| 38 | try { |
| 39 | if (iframe?.contentDocument?.body) { |
| 40 | return (await cloneNode( |
| 41 | iframe.contentDocument.body, |
| 42 | options, |
| 43 | true, |
| 44 | )) as HTMLBodyElement |
| 45 | } |
| 46 | } catch { |
| 47 | // Failed to clone iframe |
| 48 | } |
| 49 | |
| 50 | return iframe.cloneNode(false) as HTMLIFrameElement |
| 51 | } |
| 52 | |
| 53 | async function cloneSingleNode<T extends HTMLElement>( |
| 54 | node: T, |
no test coverage detected
searching dependent graphs…