mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 12:36:01 -07:00
Override print and printErr
This commit is contained in:
parent
8c93825aa5
commit
e1176fe2bb
@ -99,6 +99,12 @@ if [ "$DIST" = yes ]; then
|
|||||||
Module.ready = new Promise(function(resolve, reject) {
|
Module.ready = new Promise(function(resolve, reject) {
|
||||||
var Module = _Module;
|
var Module = _Module;
|
||||||
Module.onAbort = reject;
|
Module.onAbort = reject;
|
||||||
|
Module.print = function(what) {
|
||||||
|
console.log(what);
|
||||||
|
}
|
||||||
|
Module.printErr = function(what) {
|
||||||
|
console.warn(what);
|
||||||
|
}
|
||||||
Module.onRuntimeInitialized = function() {
|
Module.onRuntimeInitialized = function() {
|
||||||
try {
|
try {
|
||||||
/* Test arbitrary wasm function */
|
/* Test arbitrary wasm function */
|
||||||
|
Loading…
Reference in New Issue
Block a user