Skip to content

Commit 10a40e7

Browse files
committed
Merge branch 'staging' of github.com:TypeCellOS/TypeCell into staging
2 parents 301e605 + 2aca9b4 commit 10a40e7

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

packages/editor/src/app/documentRenderers/richtext/FrameHost.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,16 @@ export function FrameHost(props: { url: string; sessionStore: SessionStore }) {
8686
// Methods the parent is exposing to the child
8787
methods: methods,
8888
});
89-
connection.promise.then((methods) => {
90-
connectionMethods = methods;
91-
});
89+
console.info("parent window connecting to iframe");
90+
connection.promise.then(
91+
(methods) => {
92+
console.info("connected to iframe succesfully");
93+
connectionMethods = methods;
94+
},
95+
(e) => {
96+
console.error("connection to iframe failed", e);
97+
},
98+
);
9299
return iframe;
93100
}, [props.url, props.sessionStore]);
94101

packages/frame/src/Frame.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,16 @@ export const Frame: React.FC<Props> = observer((props) => {
135135
// Methods child is exposing to parent
136136
methods,
137137
});
138-
connection.promise.then((parent) => {
139-
connectionMethods.current = parent;
140-
});
138+
console.info("iframe connecting to parent window");
139+
connection.promise.then(
140+
(parent) => {
141+
console.info("connected to parent window succesfully");
142+
connectionMethods.current = parent;
143+
},
144+
(e) => {
145+
console.error("connection to parent window failed", e);
146+
},
147+
);
141148
}, [modelReceivers]);
142149

143150
const document = useResource(() => {

0 commit comments

Comments
 (0)