diff --git a/src/core/drive/morph_renderer.js b/src/core/drive/morph_renderer.js index 87401ee23..2c5d14874 100644 --- a/src/core/drive/morph_renderer.js +++ b/src/core/drive/morph_renderer.js @@ -1,8 +1,8 @@ import { Idiomorph } from "idiomorph/dist/idiomorph.esm.js" import { dispatch } from "../../util" -import { Renderer } from "../renderer" +import { PageRenderer } from "./page_renderer" -export class MorphRenderer extends Renderer { +export class MorphRenderer extends PageRenderer { async render() { if (this.willRender) await this.#morphBody() } diff --git a/src/tests/fixtures/page_refresh.html b/src/tests/fixtures/page_refresh.html index f7f577d56..240975ef3 100644 --- a/src/tests/fixtures/page_refresh.html +++ b/src/tests/fixtures/page_refresh.html @@ -47,6 +47,15 @@ target.textContent = "connected" } }) + + document.getElementById("add-new-assets").addEventListener("click", () => { + const stylesheet = document.createElement("link") + stylesheet.id = "new-stylesheet" + stylesheet.rel = "stylesheet" + stylesheet.href = "/src/tests/fixtures/stylesheets/common.css" + stylesheet.dataset.turboTrack = "reload" + document.head.appendChild(stylesheet) + })