Hi guys please forgive me if I do something out of protocol I am very new
I'm using a script that makes canvases from images dynamically none have an id i would like to isolate a canvas by id
so my question is if and how can I copy the images title and make it the corresponding canvas ID

Code:
var _createCanvasElement = function( container, image, defaultColor ) {
			
			var canvas = document.createElement('canvas'), canvasContext = canvas.getContext('2d');
			canvas.width = image.width;
			canvas.height = image.height;
		        canvasContext.drawImage(image, 0, 0);
			container.append(canvas);
and it results in
HTML Code:
<canvas width="148" height="159" style="width: 148px; height: 159px; cursor: pointer;"></canvas>
I tried adding
Code:
canvas.id = image.title;
and got
HTML Code:
<canvas id="" width="148" height="159" style="width: 148px; height: 159px; cursor: pointer;"></canvas>
Id still empty