summaryrefslogtreecommitdiff
path: root/web-ui/public/js/sandbox.js
diff options
context:
space:
mode:
authorZara Gebru <zgebru@thoughtworks.com>2016-12-02 15:25:23 +0100
committerZara Gebru <zgebru@thoughtworks.com>2016-12-02 15:25:23 +0100
commitb14833fbb56bcd5bff0750c16fd9214009b955be (patch)
treea1ec621dd5f76d756ac59b72a763a34a2c189387 /web-ui/public/js/sandbox.js
parent688a8b42e8ab7c6d4529b6dda66f40eead07ad02 (diff)
[refactor] move app dir into public dir
Diffstat (limited to 'web-ui/public/js/sandbox.js')
-rw-r--r--web-ui/public/js/sandbox.js11
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);
+ }
+ };
+})();