I’m having trouble with the same method - for whatever reason, the variable I put in isn’t being evaluated by skycons.add( … ) correctly.
newElementHtml += "<div class='col-sm-3'>" + "<canvas id='icon_" + index + "' width='128' height='128'></canvas>" + "</div>";
var canvasName = "icon_" + index.toString();
When I replace “canvasName” with a static string, e.g. “icon_0”, it displays correctly. I also tried printing “canvasName” and its type to double check it’s being set like I expected, and it’s giving the correct id and showing it as a string. Any idea what could be happening?