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
|
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)
oGrammalecteAPI.getSpellingSuggestions(word, destination, request_identifier)
Parameters:
- word (string)
- destination: node_id (string)
- error_identifier: a custom identifier (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 error_identifier
let oInfo = event.detail.oInfo; // object containing the destination and the request_identifier
...
}
}
|