Hello, I am trying to add Event Listener on click to the red dot that appears on the element but it doesnt work. How can I dont this?
My Code:
const note = getBusinessObject(element).noteProperty;
if(note){
const rect = this.drawRect(parentNode, 'rect1', 15, 15, 15, 'rgb(204,0,0)');
svgAttr(rect, {
transform: 'translate(0, 0)'
});
const noteRect = document.querySelector("#rect1");
noteRect.addEventListener('click', (event)=>{console.log('clicked')});
}