Grammalecte  Diff

Differences From Artifact [897ba1cfeb]:

To Artifact [f938801ed1]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Background

"use strict";

function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}

/*
    Worker (separate thread to avoid freezing Firefox)
*/
//let xGCEWorker = new Worker("gce_worker.js");
let xGCESharedWorker = new SharedWorker(browser.extension.getURL("gce_sharedworker.js"));
let xGCEWorker = xGCESharedWorker.port;

xGCEWorker.onmessage = function (e) {
    // https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent
    try {
        switch (e.data[0]) {
            case "grammar_errors":
                console.log("GRAMMAR ERRORS");












|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Background

"use strict";

function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}

/*
    Worker (separate thread to avoid freezing Firefox)
*/
//let xGCEWorker = new Worker("gce_worker.js");
var xGCESharedWorker = xGCESharedWorker || new SharedWorker(browser.extension.getURL("gce_sharedworker.js"), {type:"classic", credentials:"omit", name:"GrammarWorker"});
var xGCEWorker = xGCESharedWorker.port;

xGCEWorker.onmessage = function (e) {
    // https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent
    try {
        switch (e.data[0]) {
            case "grammar_errors":
                console.log("GRAMMAR ERRORS");