Javascript libraries not loading when embedded in div
Summary
Custom javascript is working in debugger and iframe, but does not load in divContent
I have a client trying to embed an interview in a div on their site. The interview uses several javascript libraries for an interview extension (a leaflet map control). Everything works in the debugger, on the hub, and when embedded in an iframe. When we try to embed in a div, the libraries are not loaded/accessible. Client wants to pursue div over iframe due to the Safari domain mismatch issue.
I think this is because the client site is using a module loader (AMD?). The control extension expects the libraries to be loaded into the browser's Global scope, but they're not there. I can see the files listed among the site's source files, but the OPA interview can't use them. Is there a way to define interview extensions that is compatible with javascript module loaders? I can figure out some basic javascript, but this module thing is a bit over my head right now.