<div dir="ltr">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.<div><br></div><div>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.</div><div><br></div><div>For example, here are two JavaScript libraries which implement a DatePicker:</div><div><br></div><div><a href="https://github.com/eternicode/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js">https://github.com/eternicode/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js</a><br></div><div><br></div><div><a href="https://github.com/dbushell/Pikaday/blob/master/pikaday.js">https://github.com/dbushell/Pikaday/blob/master/pikaday.js</a><br></div><div><br></div><div>They both appear to have a single top-level "factory" function (?), apparently anonymous (?), enclosed in parentheses.</div><div><br></div><div>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.</div><div><br></div><div>Are these kind of JavaScript libraries (involving a single, anonymous top-level function) even callable via Ur/Web's FFI?</div></div>