blob: bb5d8fa3a2609b4d0b9649a54b6721157b9781ac [file] [log] [blame]
<script>
function listener(event) {
var mod = event.data;
try {
var i = new WebAssembly.Instance(mod);
var ans = i.exports.calc(5);
window.parent.postMessage(ans, event.origin);
} catch (e) {
window.parent.postMessage(e, event.origin);
}
}
addEventListener("message", listener, false);
window.parent.postMessage("ready", "*");
</script>