summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/emscripten/prefix_module.js
blob: 05d09cd723c604c8e16f3587e429c452e519b87b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
    if( !Module.hasOwnProperty('noInitialRun') ) { Module.noInitialRun = true; }
    if( !Module.hasOwnProperty('noExitRuntime') ) { Module.noExitRuntime = true; }
    if( !Module.hasOwnProperty('print') || typeof Module["print"] != 'function')
    {
        Module.print = (function()
        {
            return function(text) 
            {
                if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
                console.log(text);
            };
        })();
    }
    if( !Module.hasOwnProperty('printErr') || typeof Module["printErr"] != 'function')
    {
        Module.printErr = function(text) 
        {
            if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
            if (0) 
            { // XXX disabled for safety typeof dump == 'function') {
                dump(text + '\n'); // fast, straight to the real console
            } 
            else 
            {
                console.error(text);
            }
        };
    }