I understand that it is necessary to use Ur/Web's JavaScript FFI in order to call an existing JavaScript library, and I have to declare the functions in a URS file.
The difficulty I have is that when I look at certain JavaScript libraries, I have difficulty determining what functions are at "top-level" in the JS file, to declare in the URS file. For example, here are two JavaScript libraries which implement a DatePicker: https://github.com/eternicode/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js https://github.com/dbushell/Pikaday/blob/master/pikaday.js They both appear to have a single top-level "factory" function (?), apparently anonymous (?), enclosed in parentheses. Then they both return a bunch of things in { ... } - var declarations and function declarations etc. But these things aren't at "top-level" so I doubt it would make much sense to refer to such function declarations from a URS file. Are these kind of JavaScript libraries (involving a single, anonymous top-level function) even callable via Ur/Web's FFI?
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
