- Fix (Embedded editor): Ensure origins can match by extracting origin out of base path

This commit is contained in:
Brett Zamir
2018-07-18 22:32:04 -07:00
parent b023a0076b
commit 7e9235504a

View File

@@ -75,7 +75,7 @@ const iframe = $(`<iframe src="${frameBase}${framePath}` +
'" width="900px" height="600px" id="svgedit""></iframe>'
);
iframe[0].addEventListener('load', function () {
svgCanvas = new EmbeddedSVGEdit(frame, [frameBase]);
svgCanvas = new EmbeddedSVGEdit(frame, [new URL(frameBase).origin]);
// Hide main button, as we will be controlling new, load, save, etc. from the host document
let doc;
try {