diff --git a/index.js b/index.js index 99a4af0..40a47a5 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,7 @@ import { createSvelteSlots, findSlotParent, unwrap } from './utils.js'; */ // eslint-disable-next-line no-unused-vars function renderElements(timestamp) { + // This is key: Fetches elements in document order so we can render top-down (for context). let renderQueue = document.querySelectorAll('[data-svelte-retag-render]'); if (renderQueue.length === 0) { // TODO: Consider build of svelte-retag so we can drop console.logs() when publishing without having to comment out. See: https://github.com/vitejs/vite/discussions/7920