简体   繁体   English

如何在Haxe中调度事件?

[英]How to dispatch events in Haxe?

How can I dispatch events in Haxe using the JavaScript target? 如何使用JavaScript目标在Haxe中调度事件? 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. 我试图搜索Haxe网站,但找不到解决问题的本地方法。

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. 如果这是js目标,那么您将在Haxe中使用普通的js api。

Take a look here to see how to use js in Haxe : http://philippe.elsass.me/2014/11/vanilla-haxe-js/ 在这里看看如何在Haxe中使用js: 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 并且您可以在此处查看js事件api: https : //developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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