I have a string variable named log.htmlContent that contains some HTML content. This variable is passed into a div to be displayed using v-html. The particular div will only be displayed if log.htmlContent includes an img tag (http: will only be present in log.htmlContent if there is an img tag).
<div
v-html="log.htmlContent"
v-if="log.htmlContent.includes('http:')"
class="textContent"
></div>
I am interested in adding a listener to the injected img tag that will trigger a function passing the src content of the img tag as a parameter. Is this achievable with vue? If so, how can it be done? Thank you in advance for your assistance!