diff --git a/editor/svg-editor.js b/editor/svg-editor.js index ef8c5618..8b602dc5 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -173,6 +173,20 @@ } Editor.init = function() { + // For external openers + (function() { + // let the opener know SVG Edit is ready + var w = window.opener; + if (w) { + try { + var svgEditorReadyEvent = w.document.createEvent("Event"); + svgEditorReadyEvent.initEvent("svgEditorReady", true, true); + w.document.documentElement.dispatchEvent(svgEditorReadyEvent); + } + catch(e) {} + } + })(); + (function() { // Load config/data from URL if given var urldata = $.deparam.querystring(true);