Fix: fix the default src of empty iframe to avoid loading index page

This commit is contained in:
cuixiping
2020-01-07 18:14:05 +08:00
parent eea489e602
commit d0348ddf4e
4 changed files with 4 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ function exportPDF () {
const frameBase = 'https://raw.githack.com/SVG-Edit/svgedit/master';
// const frameBase = 'http://localhost:8001';
const framePath = '/editor/xdomain-svg-editor-es.html?extensions=ext-xdomain-messaging.js';
const iframe = $('<iframe width="900px" height="600px" id="svgedit"></iframe>');
const iframe = $('<iframe width="900px" height="600px" id="svgedit" src="javascript:0"></iframe>');
iframe[0].src = frameBase + framePath +
(location.href.includes('?')
// ? location.href.replace(/\?(?<search>.*)$/, '&$<search>')