blob: 2ecd39025b07be95ada2fcd9d80abd120be4210f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
function assert(x) {
if (!x) throw 'error!';
}
function test() {
Binaryen.setAPITracing(true);
var module = new Binaryen.Module();
module.addCustomSection("hello", [119, 111, 114, 108, 100]);
assert(module.validate());
console.log(module.emitText());
}
Binaryen.ready.then(test);
|