Feature Request: Run Haxe directly on browsers


Hi team,

this is a feature request.

can BableJs support haxe language to be transpired into EmcaScript 5/6 and run on browser directly?

if Haxe can be written and ran on browsers directly via BabelJS, Haxe/Openfl game can then be developed on browsers and also compiled into native package/executable.

I believe this feature can be a great marketing strategy for haxe to expand its user base.
Game Develoeprs shall use haxe instead of EmcaScript!!


You can write code in Haxe, then compile to ECMAscript.

You can also use our NPM release, and write in ES5, ES6, TypeScript or Haxe.

Are you suggesting runtime, in-browser transpilation from Haxe to JS? What would the benefit be over one of the above approaches?


yes, I mean runtime, in-browser transpilation from Haxe to JS via BabelJS.

There are many html5/js live collaborative apps/editor out there, but they only support live-editing using html5/ES5/ES6.

if haxe/openfl can be transpired into ES5 at runtime, this means that haxe language or even openfl can be one of alternative for live-editing using hax or for web app development in addition to JS. It’s also easier for haxe enthusiasts to create online tutorial with live haxe examples running directly on the web; it’s easier for any new haxe beginner to learn haxe in this approach as well.

What do you think? any other thought?


If Haxe-in-Haxe becomes a thing, then it might be possible to compile the Haxe compiler to JavaScript… using the Haxe compiler. :slight_smile:


Thanks for the link, that’s interesting. Haxe to OCaml could be really interesting!