Grammalecte  Check-in [b4a1b21d88]

Overview
Comment:[fx] these functions have a new name
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fx | webext2
Files: files | file ages | folders
SHA3-256: b4a1b21d8886756175323b460c9b98368fe85e46d6f8b346a140c0f5453b3706
User & Date: olr on 2017-08-04 16:09:09
Other Links: branch diff | manifest | tags
Context
2017-08-05
14:58
[fx] interactions between background and gce_worker check-in: 1611ba0d30 user: olr tags: fx, webext2
2017-08-04
16:09
[fx] these functions have a new name check-in: b4a1b21d88 user: olr tags: fx, webext2
15:41
[fx][core] initialization in gce_worker.js check-in: 1f4195c966 user: olr tags: fx, webext2
Changes

Modified gc_lang/fr/webext/gce_worker.js from [0a0381f0d1] to [4cbf4d4b54].

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
function parseAndSpellcheck (sText, sLang, bDebug, bContext) {
    let aGrammErr = gc_engine.parse(sText, sLang, bDebug, bContext);
    let aSpellErr = oTokenizer.getSpellingErrors(sText, oDict);
    return JSON.stringify({ aGrammErr: aGrammErr, aSpellErr: aSpellErr });
}

function getOptions () {
    return gc_engine.getOptions()._toString();
}

function getDefaultOptions () {
    return gc_engine.getDefaultOptions()._toString();
}

function setOptions (sGCOptions) {
    gc_engine.setOptions(helpers.objectToMap(JSON.parse(sGCOptions)));
    return gc_engine.getOptions()._toString();
}

function setOption (sOptName, bValue) {
    gc_engine.setOptions(new Map([ [sOptName, bValue] ]));
    return gc_engine.getOptions()._toString();
}

function resetOptions () {
    gc_engine.resetOptions();
    return gc_engine.getOptions()._toString();
}

function fullTests (sGCOptions='{"nbsp":true, "esp":true, "unit":true, "num":true}') {
    if (!gc_engine || !oDict) {
        return "# Error: grammar checker or dictionary not loaded."
    }
    let dMemoOptions = gc_engine.getOptions();







|



|




|




|




|







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
function parseAndSpellcheck (sText, sLang, bDebug, bContext) {
    let aGrammErr = gc_engine.parse(sText, sLang, bDebug, bContext);
    let aSpellErr = oTokenizer.getSpellingErrors(sText, oDict);
    return JSON.stringify({ aGrammErr: aGrammErr, aSpellErr: aSpellErr });
}

function getOptions () {
    return gc_engine.getOptions().gl_toString();
}

function getDefaultOptions () {
    return gc_engine.getDefaultOptions().gl_toString();
}

function setOptions (sGCOptions) {
    gc_engine.setOptions(helpers.objectToMap(JSON.parse(sGCOptions)));
    return gc_engine.getOptions().gl_toString();
}

function setOption (sOptName, bValue) {
    gc_engine.setOptions(new Map([ [sOptName, bValue] ]));
    return gc_engine.getOptions().gl_toString();
}

function resetOptions () {
    gc_engine.resetOptions();
    return gc_engine.getOptions().gl_toString();
}

function fullTests (sGCOptions='{"nbsp":true, "esp":true, "unit":true, "num":true}') {
    if (!gc_engine || !oDict) {
        return "# Error: grammar checker or dictionary not loaded."
    }
    let dMemoOptions = gc_engine.getOptions();