summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r--src/js/binaryen.js-post.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index 03e57d3d5..7c99ded15 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -2105,6 +2105,11 @@ function wrapModule(module, self) {
self['setFeatures'] = function(features) {
Module['_BinaryenModuleSetFeatures'](module, features);
};
+ self['addCustomSection'] = function(name, contents) {
+ return preserveStack(function() {
+ return Module['_BinaryenAddCustomSection'](module, strToStack(name), i8sToStack(contents), contents.length);
+ });
+ };
self['emitText'] = function() {
var old = out;
var ret = '';