Hello team,
Another question I have is that when I create a widget, it depends on other libraries that I must preload before run init js code. Currently in my init script I use Wisej.load([…], performLoad), but I have a feeling that there’re might be a better solution for it, is it? overriding Packages property does not help much, because it doesn’t ensure scripts will be loaded prior to init() in JS.
Also, are you planning to add following: webpack, npm support, typescript support for creating complex widgets?
Also, how can I add another js file (in same folder at least) to be used as part of initialisation? (let’s say after some libs loaded, I want to setup a components/modules/etc. and then use it in my init() JS code). I tried to use Wisej.load(‘anotherfile.js’, callback) or var el = document.createElement(‘script’); el.src = ‘anotherfile.js’; el.onload = callback; … etc., but it never worked and had only 404 Not Found at most. It’s not super convenient to have all setup code in a single file
Please advice, as I have a feeling that it should be pretty common scenario when creating widgets. May be you can provide some existing examples that make use of these things?
Regards,
Michael
See items below, I tried to keep the ordered 🙂
Example for the last point:
private void async button1_Click(object sender, EventArgs e) { var result = await EvalAsync("return 3+2;"); AlertBox.Show(result.ToString()); } HTH
Also as an ER, It would be great to have in a Widget a method similar to Call(), but which returns a value of what returns called js function