Can't access style of a clicked target

Question:
When I execute this code, the console returns “undefined”.

$w('#image1').onClick((event) => {
		
		const clickedElement = event.target;
		console.log(clickedElement.style);
		clickedElement.style.backgroundColor = 'blue';
		clickedElement.style.borderWidth = 22;
	});

Product:
Editor X I think

What are you trying to achieve:
Changing the style of the clicked image

What have you already tried:
This:

$w('#image1').onClick((event) => {
		
		const clickedElement = event.target;
		console.log(clickedElement.style);
		clickedElement.style.backgroundColor = 'blue';
		clickedElement.style.borderWidth = 22;
	});

Image elements don’t have style attribute. They don’t support .style like containers/boxes.

Instead, you can use CSS classes to style any element on your site.