getCurrentTimeInMilliseconds :: !*JSWorld -> (!Int,!*JSWorld) getCurrentTimeInMilliseconds world #! (ms,world) = (jsGlobal "Date.now" .$ ()) world = (jsValToInt` 0 ms,world)
I have tried things like:
# (date, world) = jsNewObject "Date"  world # (now, world) = callObjectMethod "now"  date world # now = jsValToInt now
but that does not work (
jsGetObjectAttr: accessed undefined attribute: now and
jsApply: Evaluating undefined function error in the client console).