I am spending all day on this issue, tried to search everywhere but as you can see I am stuck with the sanitization debug issue, so I will try to explain what I am doing and what exactly triggers this issue.
Put it simples, I am creating a series of inputs based on the values of a spreadsheet. To be more exact I am creating a schedule function to a lobby app, this function is supposed to have a list of all workers with two time inputs, in a away the lobby worker can fill the time each worker enter and leaves the building.
Thus, I decided to dynamically create a form.
https://pastebin.com/GBLkv3NPAbove I have the .gs code that work on this.
As you can see on this line below:
agendaColaboradores.append('<input class="elementoFormularioMovCob" type="time" id="movCobHoraEntradaES' + colaboradorTrim + '" name="movCobHoraEntrada' + colaboradorTrim + '"' + 'onchange="teste()"' + '>\r');
It's results on this HTML element, one input for each worker:
<input class="elementoFormularioMovCob" type="time" id="movCobHoraEntradaESWorkerName" name="movCobHoraEntradaWorkerName" onchange="teste()">
And it's seems that have nothing wrong there
The teste JS function it's a really simple function that I use for debugging
function teste() {
debugger;
alert("ha");
}
(The debugger are not really helping, but I let it there)
But when i change the input value, nothing happens and instead I receive this line on chrome dev console:
Uncaught SyntaxError: missing ) after argument list (at userCodeAppPanel
It's triggers each time I change the input value, which means it's being triggered by onchange().
It's not an error on my .js files since other event triggers like onclick() are working as they should and not triggering said line.