Make hack javascript work with js_of_ocaml 2.0
commit022bb8bec0cf4196640a1c4e2f13a938a5cc6e71
authorJoel Beales <joelb@fb.com>
Mon, 21 Apr 2014 18:19:56 +0000 (21 11:19 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 21 Apr 2014 20:27:55 +0000 (21 13:27 -0700)
tree102af90e93739497f704cf4480a9b744490bd3fc
parent934fe4c8d4eaeb9543d09cb87ba2d512d3460c78
Make hack javascript work with js_of_ocaml 2.0

Summary: Looks like js_of_ocaml 2.0 changed two things:
-Added some sort of scoping where we were exporting functions
-Made new MlString break.

Changes:
-Add self. where it was needed to make the stuff we were exporting global. self works in a window or a webworker. Tested that.
-instead of using new MlString, I exported the function that converts js strings to MlStrings and used it where we used to.

ihavenoideawhatimdoing
but it works ok now

Reviewed By: @jwatzman

Differential Revision: D1274773
hphp/hack/src/js/hh_ide.ml