Sign in
chromium
/
external
/
github.com
/
WebAssembly
/
binaryen
/
refs/heads/docs
/
.
/
test
/
binaryen.js
/
custom-section.js
blob: f61af0096589ce1b2ea9b81a067aecf933ffe655 [
file
] [
log
] [
blame
] [
edit
]
function
assert
(
x
)
{
if
(!
x
)
throw
'error!'
;
}
Binaryen
.
setAPITracing
(
true
);
var
module
=
new
Binaryen
.
Module
();
module
.
addCustomSection
(
"hello"
,
[
119
,
111
,
114
,
108
,
100
]);
assert
(
module
.
validate
());
console
.
log
(
module
.
emitText
());