foss-design 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -859,6 +859,11 @@ function boot() {
859
859
  if (booted) return;
860
860
  booted = true;
861
861
  applyTheme(theme);
862
+ if (embedded) {
863
+ const style = document.createElement("style");
864
+ style.textContent = ":where(html, body) { overscroll-behavior: none; }";
865
+ document.head.prepend(style);
866
+ }
862
867
  let inspector = null;
863
868
  window.addEventListener("message", (event) => {
864
869
  const data = event.data;
@@ -938,8 +943,8 @@ function boot() {
938
943
  };
939
944
  const whenBodyReady = () => {
940
945
  if (embedded) watchSize();
941
- const fonts = document.fonts?.ready ?? Promise.resolve();
942
- void fonts.then(() => requestAnimationFrame(() => requestAnimationFrame(ready)));
946
+ const loaded2 = document.readyState === "complete" ? Promise.resolve() : new Promise((resolve) => window.addEventListener("load", () => resolve(), { once: true }));
947
+ void loaded2.then(() => document.fonts?.ready).then(() => requestAnimationFrame(() => requestAnimationFrame(ready)));
943
948
  };
944
949
  if (document.body) whenBodyReady();
945
950
  else document.addEventListener("DOMContentLoaded", whenBodyReady, { once: true });