We're using Ace by including the original source code - so not the built version - by including all files we might need with require.js.
The modes xquery and jsoniq are giving some unwanted behaviour when including them - but not having them active - and then enabling live autocompletion in completely different modes such as ace/mode/ini.
The following code from jsoniq.js throws a TypeError, even though the jsoniq mode isn't active, during typing:
We're using Ace by including the original source code - so not the built version - by including all files we might need with require.js.
The modes
xquery
andjsoniq
are giving some unwanted behaviour when including them - but not having them active - and then enabling live autocompletion in completely different modes such asace/mode/ini
.The following code from jsoniq.js throws a TypeError, even though the jsoniq mode isn't active, during typing:
The error is: "Uncaught TypeError: Cannot read property 'emit' of null"
When that happens, unwanted characters are added to the output.
I presume it's related to the mode having a worker, as I can't reproduce it on .php which does have a worker.
Some implementation details - the files are included with require.js before they're actually needed:
And then in the ' function' block above, these commands are run at some point: