I am trying to communicate with an HTML component.
The HTML is uploaded to the application on the Assets menu.
I think what happens is that the HTML that is uploaded does not recognise the 'JourneyIFrameClient' class. When I have the following code in the html file:
alert (“This is a warning message!”);
const JourneyClient = new JourneyIFrameClient();
alert (“This is NOT a warning message!”);
The second alert does not run.
Should the source code for the JourneyIFrameClient perhaps be included in the html file that is uploaded? How does it know the definition of the JourneyIFrameClient class?
I am running this in a tutorial sandbox - testing environment.
Instead of copy and pasting the code, you can use something like webpack to bundle everything into one HTML file. You can do this for any npm packages.