Grammalecte  Diff

Differences From Artifact [6481a45de5]:

To Artifact [b8843fe5b2]:


112
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
    }

For the last event, `oResult` will be `null`.


### Get spelling suggestions

    oGrammalecteAPI.getSpellingSuggestions(word, destination, error_identifier)

Parameters:

- word (string)

- destination: node_id (string)

- error_identifier: a custom identifier (string)

Suggestions will be sent within an event at the node identified by `destination`.

    node.addEventListener("GrammalecteResult", function (event) {
        if (event.detail.sType  &&  event.detail.sType == "spellsugg") {
            let oResult = event.detail.oResult;
            let oInfo = event.detail.oInfo; // object containing the destination and the error_identifier
            ...
        }
    }







|







|






|



112
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
    }

For the last event, `oResult` will be `null`.


### Get spelling suggestions

    oGrammalecteAPI.getSpellingSuggestions(word, destination, request_identifier)

Parameters:

- word (string)

- destination: node_id (string)

- request_identifier: a custom identifier (string) [default = ""]

Suggestions will be sent within an event at the node identified by `destination`.

    node.addEventListener("GrammalecteResult", function (event) {
        if (event.detail.sType  &&  event.detail.sType == "spellsugg") {
            let oResult = event.detail.oResult;
            let oInfo = event.detail.oInfo; // object containing the destination and the request_identifier
            ...
        }
    }