Skip to content

Commit

Permalink
minor haxe 3.3.0 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
zjnue committed Jun 20, 2016
1 parent 118620d commit 0e3956c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/hsm/Scxml.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ import hsm.scxml.Base;
import sys.FileSystem;
#end

#if js
#if (haxe_ver >= 3.300)
import js.jquery.JQuery;
#else
import js.JQuery;
#end
#end

#if flash
@:file("Interp.swf") class InterpByteArray extends flash.utils.ByteArray {}
#end
Expand Down Expand Up @@ -173,7 +181,7 @@ class Scxml {
var event : js.CustomEvent = null;

try {
nodes = new js.JQuery(target).get();
nodes = new JQuery(target).get();
if( nodes.length == 0 ) {
log("sendDomEvent target not found: " + target);
postToWorker( "sendDomEventFailed", [fromInvokeId] );
Expand Down
2 changes: 1 addition & 1 deletion src/hsm/scxml/Interp.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ class Interp extends Base {
new Interp().export();
}

override public function handleOnMessage(data) {
override public function handleOnMessage( data : Dynamic ) {
var msg = hxworker.Worker.uncompress( data );
switch( msg.cmd ) {
case "postEvent": postEvent( cast(msg.args[0], Event) );
Expand Down

0 comments on commit 0e3956c

Please sign in to comment.