Javascript event simulation library

后端 未结 4 1675
花落未央
花落未央 2020-12-21 23:04

Do you know a JS library for DOM events simulation? I know that this operation can be done but i can\'t find any library to do it.

UPDATE: I try to

4条回答
  •  鱼传尺愫
    2020-12-21 23:28

    http://developer.yahoo.com/yui/3/event/#eventsimulation

    """ Simulated events are browser-created events that, most of the time, behave exactly as user-initated events. Events bubble as they normally would and event objects are created with properties containing data about the event (sometimes these properties are browser-specific, so it's recommended that you make use of the browser-equalizing methods of Y.Event to retrieve the appropriate values for properties such as target, relatedTarget, and charCode. All event handlers are called synchronously at each event target throughout the event's lifetime. Events are simulated using the simulate() method on any Y.Node instance. """

提交回复
热议问题