aboutsummaryrefslogtreecommitdiff
path: root/ext/sb
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-09-05 20:35:39 -0700
committerAlex Yatskov <alex@foosoft.net>2017-09-05 20:35:39 -0700
commit722ddf163818035d603ba8042e1e32ff7dcdfc84 (patch)
tree1fd4ed0766b2b4ea19ac6eb9224bb5d66edde859 /ext/sb
parent9eac50ea05ae48e77c1bb0ef7b42d9662094cbf8 (diff)
work on sandbox
Diffstat (limited to 'ext/sb')
-rw-r--r--ext/sb/js/sandbox.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/sb/js/sandbox.js b/ext/sb/js/sandbox.js
index 76b7b511..bf1d56c1 100644
--- a/ext/sb/js/sandbox.js
+++ b/ext/sb/js/sandbox.js
@@ -24,7 +24,7 @@
window.addEventListener('message', event => {
if (event.data.command === 'render') {
const template = Handlebars.compile(event.data.template || '');
- const result = template(event.data.context || {});
- event.source.postMessage({result, sequence: event.data.sequence});
+ const result = template(event.data.data || {});
+ event.source.postMessage({result, sequence: event.data.sequence}, '*');
}
});