version of javascript in Domino Designer?

450 Views Asked by At

In working on a Domino web-based form, in the onChange event for a field (JavaScript), I am not able to use certain syntax, as it throws errors and the code will not save. Examples are:

  • instead of var, I would like to use const and let, but it will not take it.
  • Also, when trying to use arrow functions it throws an invalid syntax error.

So does Designer come with a particular version of Javascript built in for compiling/syntax validation? Is there a way to update that (patch or something on the Designer client?)

I am using HCL Domino Designer 11.1

2

There are 2 best solutions below

0
Scott Leis On BEST ANSWER

I think there's nothing you can do about the javascript syntax validation when editing JS in a form, but there is a workaround.

If you create a new File Resource in your database (under Resources->Files in the Applications pane), and give that resource a name ending with ".js", you can edit it in Designer with syntax highlighting but without validation, so you can use newer syntax.

Put functions in the File Resource for all your form logic, call those functions from events in the form, and also reference the File Resource in a script tag in the form header.

3
D.Bugger On

Maybe a rather lame explanation: Domino Designer doesn't really come with JavaScript, it has a JavaScript compiler that translates JavaScript to Java. It isn't the latest version of the language, that's for sure. More info on the HCL site: https://support.hcltechsw.com/csm/zh?id=community_question&sys_id=4299632fdb5e10d455f38d6d13961965