• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Is there any method to replace initEvent in typescript?

Resolved: Is there any method to replace initEvent in typescript?

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I would like to trigger the MouseEvent manually in typescript and it shows the initEvent is deprecated.
in this screenshot, it shows the initEvent is deprecated.
Is there any alternate way to achieve this?

Answer:

initEvent is 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().


MouseEvent is 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!

javascript typescript
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Sort dataframe columns value by close it to another column

27/03/2023

Resolved: PostgreSQL resample 1 minute OHLCV candle data into 5 minute OHLCV candle data

27/03/2023

Resolved: How do I navigate a table without any easily accessible distinctions?

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.