I have a function in the add-on and I have an image in the page. How can I call that function from the add-on when the user click on the image?
<img src='something' onclick="thisfunction();"> //what is need to call thisfuntion function in the add-on?
//in the add-on:
function thisfunction(){ .... }
Is that HTML code you inject into the web page? Then you should attach an event listener: