summaryrefslogtreecommitdiff
path: root/web-ui/app/js/sandbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/sandbox.js')
-rw-r--r--web-ui/app/js/sandbox.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web-ui/app/js/sandbox.js b/web-ui/app/js/sandbox.js
new file mode 100644
index 00000000..33b16ea4
--- /dev/null
+++ b/web-ui/app/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);
+ }
+ };
+})();