Modify top level document in public app?

Hey @tradesorg_chris!

I don't know that this is possible directly, the best solution I'm aware of would be similar to the one for your question here. You might try having a script that does something like:

const head = document.querySelector("head")l
const script = document.createElement("script");

script.type = "application/ld+json";

head.appendChild(script);

window.addEventListener(
  "message",
  (event) => {
    script.innerHTML = JSON.stringify(event.data);
  },
  false
);

I'm not sure if that works for your use case though (e.g. I imagine it will get missed by search crawlers).