ScriptCommunicator uses the the Qt class QJSEngine to execute the scripts. If this class does not support these functions, I can't do anything about it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also strange, regarding the docs your linked it should know replaceAll() but if i use this method, the script internally aborts/stops without giving any error (at least i see none). I had to use replace(REGEX/g, "..") instead.
Last edit: devnull 2024-01-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ran into trouble using some, i thought standard ECMA-262 Javascript methods, which i need to "rebuild".
No support for .format() using placeholders (sprintf-style).
Added with extending the object:
No support for .keys() method on arrays
ScriptCommunicator uses the the Qt class QJSEngine to execute the scripts. If this class does not support these functions, I can't do anything about it.
I think String.prototye.format and String.prototype.keys are not standard JavaScript. Look here : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
Last edit: Stefan Zieker 2024-01-18
Also strange, regarding the docs your linked it should know replaceAll() but if i use this method, the script internally aborts/stops without giving any error (at least i see none). I had to use replace(REGEX/g, "..") instead.
Last edit: devnull 2024-01-20
I will look into when I have time. Thx for reporting this.