Custom Widget needs to include call to remote JavaScript source

0
Here is my issue. I'm creating a widget to use Stripe Elements (https://stripe.com/docs/stripe-js/elements/quickstart) and I need JavaScript file inside my widget or app to use the API. I first tried to copy the JavaScript file contents from the remote host (https://js.stripe.com/v3/) into a file on lib directory and inject it in my widget.js This partly worked. I could see the new  JS Stripe Object but when I tried to create an instance for the API it throws an error saying the source must come from https://js.stripe.com/v3/  My questions is how do I remote JS call to my widget or to my Mendix app ?
asked
2 answers
1

Haven't tried it myself, but this StackOverflow post seems to answer your question:

https://stackoverflow.com/questions/12313624/how-to-load-a-js-file-that-is-not-a-module-in-dojo

answered
0

You can also look at some of the google maps widgets which load scripts from Google.

answered