Overview
Comment: | [doc] Web API update: add JSON.parse(event.detail) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | doc |
Files: | files | file ages | folders |
SHA3-256: |
ce33035715dfbe72e3d7681ddcd10031 |
User & Date: | olr on 2020-03-21 14:41:00 |
Other Links: | manifest | tags |
Context
2020-03-21
| ||
15:13 | [fx] Web API: warn the webpage when the API script is loaded check-in: 2bedf50a10 user: olr tags: trunk, fx | |
14:41 | [doc] Web API update: add JSON.parse(event.detail) check-in: ce33035715 user: olr tags: trunk, doc | |
14:35 | [fr] tests supplémentaires check-in: 7f0b5b060e user: olr tags: trunk, fr | |
Changes
Modified doc/API_web.md from [b8843fe5b2] to [d27d7a87a4].
︙ | |||
85 86 87 88 89 90 91 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | + - - + + + - - + + | If you don’t want Grammalecte to modify directly the node content, add the property: `data-grammalecte_result_via_event="true"`. With this property, Grammalecte will send an event to the node each times the text is modified within the panel. The text can be retrieved with: node.addEventListener("GrammalecteResult", function (event) { const detail = (typeof(event.detail) === 'string') && JSON.parse(event.detail); |
︙ | |||
125 126 127 128 129 130 131 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | + - - - + + + | - 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) { const detail = (typeof(event.detail) === 'string') && JSON.parse(event.detail); |