Function ondragover tag



I have this code on a tag:

div(class=“layer” ondragover=“dragOverLayer(event)”)

and I declare the function on mounted hook but the debug console says:

dragOverLayer is not defined at HTMLDivElement.ondragover

Do you know how can i solve it?


You’ll need to provide the related code for us to tell, but functions called within a template must be defined within the methods option of a component.