summaryrefslogtreecommitdiff
path: root/web-ui
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui')
-rw-r--r--web-ui/app/js/sandbox.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/web-ui/app/js/sandbox.js b/web-ui/app/js/sandbox.js
index 63ce94b2..33b16ea4 100644
--- a/web-ui/app/js/sandbox.js
+++ b/web-ui/app/js/sandbox.js
@@ -1,14 +1,11 @@
(function () {
'use strict';
- window.addEventListener('message', function(e) {
- var mainWindow = e.source;
- mainWindow.postMessage('data ok', e.origin);
- });
-
window.onmessage = function (e) {
if (e.data.html) {
document.body.innerHTML = e.data.html;
+ var mainWindow = e.source;
+ mainWindow.postMessage('data ok', e.origin);
}
};
})();