简体   繁体   中英

How to dispatch events in Haxe?

How can I dispatch events in Haxe using the JavaScript target? Is there a recommended library?

Any idea? I tried to search the Haxe website, but I couldn't find a native approach to solve the problem.

This totally depends on what platform you are targeting.

If it's the js target, then you will use the normal js api in Haxe.

Take a look here to see how to use js in Haxe : http://philippe.elsass.me/2014/11/vanilla-haxe-js/

and you can check that out the js event api here : https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM