JamesBowen
19+ years progress programming and still learning.
Problem:
In my webspeed html page I have embed JavaScript code. The JavaScript code includes backticks ( ` ) . In WebSpeed the backtick has a special purpose and so the webspeed code can't compile because of the conflicting javasctipt. As I understand it, the JavaScript language evolved to include the backtick in 2015.
Workaround:
My workaround solution is to substitute the backtick ` character with `chr(96)`.
This is ugly, but it's the only thing that works. I was hoping to use a tilde character to escape the back ticks i.e. ~` , but this did not work.
The other solution was to place the Javascript code into a separate .js file, but this seems like an overkill.
Is it worth perusing with Progress to create a solution?
In my webspeed html page I have embed JavaScript code. The JavaScript code includes backticks ( ` ) . In WebSpeed the backtick has a special purpose and so the webspeed code can't compile because of the conflicting javasctipt. As I understand it, the JavaScript language evolved to include the backtick in 2015.
Code:
<script>
const name = "James";
const role = "OpenEdge Developer";
const message = `Hello ${name}, your role is ${role}.`;
console.log(message);
</script>
Workaround:
My workaround solution is to substitute the backtick ` character with `chr(96)`.
This is ugly, but it's the only thing that works. I was hoping to use a tilde character to escape the back ticks i.e. ~` , but this did not work.
Code:
<script>
const name = "James";
const role = "OpenEdge Developer";
const message = `chr(96)`Hello ${name}, your role is ${role}.`chr(96)`;
console.log(message);
</script>
The other solution was to place the Javascript code into a separate .js file, but this seems like an overkill.
Is it worth perusing with Progress to create a solution?