How to call createWheelEvent

I want to call createWheelEvent to make a event using javascript, How to do?

ping @PolygonalSun

We do not have ways to do this at the moment. Explaining your end goal with a start point playground would help.

As @sebavan said, there is no proper way to do this but if you’re just trying to create a WheelEvent in Javascript, you can just use the WheelEvent constructor and then use dispatchEvent(/* name of event */) to fire it off.

let evt =  new WheelEvent("wheel", {deltaY: 100, wheelDeltaY: 100});

While there is a createWheelEvent function (I’m not sure if this was what you were originally referring to) in the DeviceEventFactory, it’s primarily used DeviceInputSystem to create objects to be wrapped in Event objects for consumption.


Thank you, your code is right. I have send mousewheel event successful