Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

better semantics

Oleg Isonen6a82f9bed557
diff --git a/apps/designer/app/designer/designer.tsx b/apps/designer/app/designer/designer.tsx
index 84b5f56a12..09ac9375df 100644
--- a/apps/designer/app/designer/designer.tsx
+++ b/apps/designer/app/designer/designer.tsx
@@ -33,7 +33,7 @@ import {
import { useClientSettings } from "./shared/client-settings";
import { Navigator } from "./features/sidebar-left";
import { PANEL_WIDTH } from "./shared/constants";
-import { onLoad } from "~/shared/dom-utils";
+import { onIframeLoad } from "~/shared/dom-utils";
export const links = () => {
return [
@@ -75,7 +75,7 @@ const usePublishDesignerReady = (publish: Publish) => {
useEffect(() => {
if (ref === null) return;
- onLoad(ref).then(() => {
+ onIframeLoad(ref).then(() => {
// We publish this even to let canvas know that we are now listening to the events, otherwise if canvas loads faster than designer, which is possible with SSR,
// we can miss the events and designer will just not connect to the canvas.
publish({ type: "designerReady" });
diff --git a/apps/designer/app/shared/dom-utils/on-iframe-load.ts b/apps/designer/app/shared/dom-utils/on-iframe-load.ts
index 3f32e706d6..3d85e18d39 100644
--- a/apps/designer/app/shared/dom-utils/on-iframe-load.ts
+++ b/apps/designer/app/shared/dom-utils/on-iframe-load.ts
@@ -2,7 +2,7 @@
* Resolve a promise when an iframe has readyState complete.
* Checks periodically for the readyState to be complete, because somttimes the load event may simply not fire for various reasons.
*/
-export const onLoad = (iframe: HTMLIFrameElement | null) =>
+export const onIframeLoad = (iframe: HTMLIFrameElement | null) =>
new Promise((resolve) => {
if (iframe === null) return;
const check = () => {