Yes - sources may have restrictions that prevent them from loading in external iFrames. A common example is when cross origin is not supported, as in the case of:
<html src="http://www.google.com" />
You'll be able to include values such as number or strings, or serialized objects.
Posting a complex object (e.g. objects that include promises) or a function will likely throw an error. For such objects you might need to Base64 encode and/or apply
JSON.stringify()before passing it in the
post(). You will only be able to post function references, not functions themselves.
Yes, by selecting it from the list of available contexts:
If your HTML content is not loading and you are seeing references to sandboxing issues in the developer console, you are most likely trying to display restricted content.
The JourneyApps iFrame Client currently allows the following:
Any other content will result in a sandboxing error.
Note that no additional restrictions are added/lifted on remote HTML sources by JourneyApps. The source may have its own sandboxing restrictions.
This happens when a view is already on the viewStack - the html component was registered the first time the view was entered and with the current implementation of the HTML and iFrame Client, you cannot re-register callback for these. You can solve this either by clearing the view from the viewStack before navigating to it, or by manually keeping track (e.g. a global variable in you SharedJS) whether the component was already registered, and not registering it again when returning to the view.
You will receive this error when you attempt to
post()to your iFrame Client before it has loaded successfully. For this you can add a
window.addEventListener('load')event to the iFrame, and post a message back to the app. An example of this is included here.