Grammalecte  Diff

Differences From Artifact [92282c126d]:

To Artifact [8fda2777a3]:


1
2
3

4




5


6
7

8

9

10
11
12
13
14
15
16
17
18
/*
import { echo } from "mymodule";


try {




    echo("It works! At last!");


}
catch (e) {

    console.error(e);

}

*/
"use strict";

let gce = null; // module: grammar checker engine
let text = null;
let tkz = null; // module: tokenizer
let lxg = null; // module: lexicographer
let helpers = null;

|
<

>

>
>
>
>
|
>
>


>

>
|
>
|
|







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



/*
try {
    console.log("BEFORE");
    //var myhelpers = require('./grammalecte/helpers.js');
    require(['./grammalecte/helpers.js'], function (foo) {
        console.log("LOADING");
        echo("MODULE LOADED2");
    });
    console.log("AFTER");
}
catch (e) {
    console.log("\n" + e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
    console.error(e);
}*/

echo("VA TE FAIRE FOUTRE");



let gce = null; // module: grammar checker engine
let text = null;
let tkz = null; // module: tokenizer
let lxg = null; // module: lexicographer
let helpers = null;

123
124
125
126
127
128
129
130
131
132
133
134
135
function handleMessage (oRequest, xSender, sendResponse) {
  console.log(`[background] received: ${oRequest.content}`);
  sendResponse({response: "response from background script"});
}

browser.runtime.onMessage.addListener(handleMessage);

try {
    loadGrammarChecker();
}
catch (e) {
    console.error(e);
}







<
<
|
<
<
<
132
133
134
135
136
137
138


139



function handleMessage (oRequest, xSender, sendResponse) {
  console.log(`[background] received: ${oRequest.content}`);
  sendResponse({response: "response from background script"});
}

browser.runtime.onMessage.addListener(handleMessage);