[Vuejs]-Svg and vue.js onload function doesnt get called should I use Mounted?

0👍

Use Vue’s @load= event instead of onload=.

 <svg
  xmlns="http://www.w3.org/2000/svg"
  width="400"
  height="1800"
  id="space"
  @load="makeDraggable"
>

You also don’t need to call it as a function and pass evt, vue will do that for you.

Leave a comment