feat: Editor Preview, patch "window.open" to navigate in same view (#18)

This commit is contained in:
Eric Tuvesson
2024-05-16 10:58:02 +02:00
committed by GitHub
parent 4e09a70a24
commit 4f85055fe8

View File

@@ -96,6 +96,12 @@ export class CanvasView extends View {
});
}
});
// Patch to open the next window in the same webview.
// Since we don't support multiple webviews.
window.open = function (url) {
window.location.href = url;
}
`;
webview.executeJavaScript(code);