Question:I would like to trigger the MouseEvent manually in typescript and it shows the initEvent is deprecated.
Is there any alternate way to achieve this?
initEventis now depreciated as shown in the hint. A note in the docs says:
Note: Do not use this method anymore as it is deprecated. Instead use specific event constructors, like Event().
MouseEventis an interface and it is used by different types of events. One of them being
mouseup. The new way of doing this is :
If you have better answer, please add a comment about this, thank you!