(rootEl: HTMLElement, plugin: CodeSpacePlugin, sourcePath: string)
| 390 | } |
| 391 | |
| 392 | export function queueCodeEmbedsInElement(rootEl: HTMLElement, plugin: CodeSpacePlugin, sourcePath: string) { |
| 393 | if (!sourcePath) return; |
| 394 | |
| 395 | ensureCodeSpaceStylesInDocument(rootEl.ownerDocument, plugin); |
| 396 | rememberSourcePath(rootEl, sourcePath); |
| 397 | |
| 398 | const embeds = rootEl.classList.contains("file-embed") |
| 399 | ? [rootEl] |
| 400 | : Array.from(rootEl.querySelectorAll<HTMLElement>(".file-embed")); |
| 401 | |
| 402 | for (const embedEl of embeds) { |
| 403 | rememberSourcePath(embedEl, sourcePath); |
| 404 | scheduleProcessCodeEmbed(embedEl, plugin, sourcePath); |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | function installPrintRefreshForDocument(doc: Document, docWindow: Window, plugin: CodeSpacePlugin) { |
| 409 | if (embedPrintRefreshByDoc.has(doc)) return; |
nothing calls this directly
no test coverage detected