How to access functions that is generated by Haxe JS ?

51 views
Skip to first unread message

Steve Jeon

unread,
Sep 11, 2014, 6:00:34 AM9/11/14
to haxe...@googlegroups.com
Hi..  

It maybe stupid question, but after trying several times, finally gave up...

After make js file from below haxe source,   how to access  functions like  Main, main, onClick, test from html?   

package ;
import js.Lib;
class Main
{
 
static function main()
 
{
 
Lib.alert ("static main");
 
}
 
static function onClick():Void
 
{
 
Lib.alert ("onclick");
 
}
 
public function test():Void {
 
Lib.alert ("test");
 
}
}


-----------------------------
in html

<script src='haxeGenerate.js'/>
<script>
   
// how to access in here??
</script>



Heinz Hölzer

unread,
Sep 11, 2014, 6:06:05 AM9/11/14
to haxe...@googlegroups.com

Sanghoon Jeon

unread,
Sep 11, 2014, 6:19:51 AM9/11/14
to haxe...@googlegroups.com
Hi, 
Works very well. 
Thank you Heinz. 
 


Best,
Steve

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages