When does svg in WeChat official account use touchstartclick?

SVG is a vector graphics format, which can display high-quality pictures in web pages. When using SVG in WeChat official account, touchstart and click are both commonly used event types, but the application scenarios are different. Details are as follows:

1, touchstart event: triggered when the user touches the screen. This event is used on mobile devices, and it will trigger immediately when the user touches it. In the official WeChat account, SVG images are designed to be dragged or zoomed, and you can use the touchstart event to achieve these functions.

2.click event: Triggered when the user clicks the mouse. This event is used on desktop devices. When using an SVG image in the official WeChat account, the SVG image is a link, and you can use the click event to jump to the link. To sum up, when using SVG in the official WeChat account, both the touchstart event and the click event have their application scenarios, and you need to choose which event to use according to your specific needs. SVG images need to be dragged or scaled, so you can use the touchstart event. An SVG image is a link, and you can use the click event to jump to the link.