Real-time collaboration within space (#411)

This commit is contained in:
Zef Hemel
2023-06-13 20:47:05 +02:00
committed by GitHub
parent 063a8e4767
commit 8e0a7cf177
54 changed files with 1358 additions and 187 deletions
+8 -4
View File
@@ -32,10 +32,14 @@ export function editorSyscalls(editor: Editor): SysCallMapping {
"editor.reloadPage": async () => {
await editor.reloadPage();
},
"editor.openUrl": (_ctx, url: string) => {
const win = window.open(url, "_blank");
if (win) {
win.focus();
"editor.openUrl": (_ctx, url: string, existingWindow = false) => {
if (!existingWindow) {
const win = window.open(url, "_blank");
if (win) {
win.focus();
}
} else {
location.href = url;
}
},
"editor.downloadFile": (_ctx, filename: string, dataUrl: string) => {