Using js frameworks in WebDialog?


#1

I’m failing miserably using a js framework like react for my WebDialog. Cross origin protection, not being able to load required files etc… Is there a hello-world example anywhere for something like this or am I stuck with jQuery etc?


#2

this should not be an issue if you load a local copy from your plugins folder…

most people do this for jQuery as well, although I find it and most frameworks far too bloated for webdialog usage…

there is an SU GUI framework on github…


#3

Finally!

After using Webpack to generate a bundled ES5 Javascript file (which allows me to use use ES6 in dev), I could include it as usual in a <script> tag. Even the communication with my ruby script works…


#4

The framework is making AJAX calls?
I’ve had to resort to JSON_P when making AJAX calls from webdialog content stored locally on the machine because cross site protection doesn’t seem to allow anything to go between file::// to http://.