Grammalecte  Diff

Differences From Artifact [b352512c63]:

To Artifact [d6421f5497]:


8
9
10
11
12
13
14

15
16
17
18

19
20
21
22
23
24
25
// In Firefox, there is no console.log in PromiseWorker, but there is worker.log.
// In Thunderbird, you can’t access to console directly. So it’s required to pass a log function.
let funcOutput = null;

var helpers = {

    setLogOutput: function (func) {

        funcOutput = func;
    },

    echo: function (obj) {

        if (funcOutput !== null) {
            funcOutput(obj);
        } else {
            console.log(obj);
        }
        return true;
    },







>




>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// In Firefox, there is no console.log in PromiseWorker, but there is worker.log.
// In Thunderbird, you can’t access to console directly. So it’s required to pass a log function.
let funcOutput = null;

var helpers = {

    setLogOutput: function (func) {
        // probably obsolete now, as console.log seems to work everywhere (at last!)
        funcOutput = func;
    },

    echo: function (obj) {
        // probably obsolete now, as console.log seems to work everywhere (at last!)
        if (funcOutput !== null) {
            funcOutput(obj);
        } else {
            console.log(obj);
        }
        return true;
    },