diff options
Diffstat (limited to 'web-ui/public/js/sandbox.js')
-rw-r--r-- | web-ui/public/js/sandbox.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/web-ui/public/js/sandbox.js b/web-ui/public/js/sandbox.js new file mode 100644 index 00000000..33b16ea4 --- /dev/null +++ b/web-ui/public/js/sandbox.js @@ -0,0 +1,11 @@ +(function () { + 'use strict'; + + window.onmessage = function (e) { + if (e.data.html) { + document.body.innerHTML = e.data.html; + var mainWindow = e.source; + mainWindow.postMessage('data ok', e.origin); + } + }; +})(); |