Fix: fix the default src of empty iframe to avoid loading index page
parent
eea489e602
commit
d0348ddf4e
|
@ -93,7 +93,7 @@ function exportPDF () {
|
||||||
const frameBase = 'https://raw.githack.com/SVG-Edit/svgedit/master';
|
const frameBase = 'https://raw.githack.com/SVG-Edit/svgedit/master';
|
||||||
// const frameBase = 'http://localhost:8001';
|
// const frameBase = 'http://localhost:8001';
|
||||||
const framePath = '/editor/xdomain-svg-editor-es.html?extensions=ext-xdomain-messaging.js';
|
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 +
|
iframe[0].src = frameBase + framePath +
|
||||||
(location.href.includes('?')
|
(location.href.includes('?')
|
||||||
// ? location.href.replace(/\?(?<search>.*)$/, '&$<search>')
|
// ? location.href.replace(/\?(?<search>.*)$/, '&$<search>')
|
||||||
|
|
|
@ -381,7 +381,7 @@ export default {
|
||||||
const allLibs = imagelibStrings.select_lib;
|
const allLibs = imagelibStrings.select_lib;
|
||||||
|
|
||||||
const libOpts = $('<ul id=imglib_opts>').appendTo(browser);
|
const libOpts = $('<ul id=imglib_opts>').appendTo(browser);
|
||||||
const frame = $('<iframe/>').prependTo(browser).hide().wrap('<div id=lib_framewrap>');
|
const frame = $('<iframe src="javascript:0"/>').prependTo(browser).hide().wrap('<div id=lib_framewrap>');
|
||||||
|
|
||||||
const header = $('<h1>').prependTo(browser).text(allLibs).css({
|
const header = $('<h1>').prependTo(browser).text(allLibs).css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|
|
@ -22,7 +22,7 @@ export default {
|
||||||
// with `getBBox` in browser.js `supportsPathBBox_`)
|
// with `getBBox` in browser.js `supportsPathBBox_`)
|
||||||
/* const target = */ $(
|
/* const target = */ $(
|
||||||
`<iframe name="output_frame" title="${strings.hiddenframe}"
|
`<iframe name="output_frame" title="${strings.hiddenframe}"
|
||||||
style="width: 0; height: 0;" src="#"/>`
|
style="width: 0; height: 0;" src="data:text/html;base64,PGh0bWw+PC9odG1sPg=="/>`
|
||||||
).appendTo('body');
|
).appendTo('body');
|
||||||
|
|
||||||
svgEditor.setCustomHandlers({
|
svgEditor.setCustomHandlers({
|
||||||
|
|
|
@ -74,7 +74,7 @@ export default {
|
||||||
// with `getBBox` in browser.js `supportsPathBBox_`)
|
// with `getBBox` in browser.js `supportsPathBBox_`)
|
||||||
$(
|
$(
|
||||||
`<iframe name="output_frame" title="${strings.hiddenframe}"
|
`<iframe name="output_frame" title="${strings.hiddenframe}"
|
||||||
style="width: 0; height: 0;" src="#"/>`
|
style="width: 0; height: 0;" src="data:text/html;base64,PGh0bWw+"/>`
|
||||||
).appendTo('body');
|
).appendTo('body');
|
||||||
svgEditor.setCustomHandlers({
|
svgEditor.setCustomHandlers({
|
||||||
save (win, data) {
|
save (win, data) {
|
||||||
|
|
Loading…
Reference in New Issue