You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Javascript libraries not loading when embedded in div

edited Oct 25, 2019 2:52PM in Intelligent Advisor for Fusion Service 1 comment

Summary

Custom javascript is working in debugger and iframe, but does not load in div

Content

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!