api-management-developer-portal
api-management-developer-portal copied to clipboard
Allow-same-origin flag in custom HTML widgets
Hi, I'm trying to show a Hubspot form embed code in a custom HTML widget:
<html>
<head>
</head>
<body>
<div style="display: flex; justify-content: center;width: 550px;margin: 0 auto;">
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
hbspt.forms.create({
portalId: "9999999",
formId: "xxxx",
sfdcCampaignId: "yyyy",
});
</script>
</div>
</body>
</html>
When I try to view in the published developer portal, I get this error at browser's console:
Uncaught DOMException: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.
at Object.getCookie (https://js.hsforms.net/forms/v2.js:1:411482)
at Object.getUtk (https://js.hsforms.net/forms/v2.js:1:556218)
at Object.s [as create] (https://js.hsforms.net/forms/v2.js:1:567835)
at about:srcdoc:9:21
Thanks
@joanboure, thank you for opening this issue. We will triage it within the next few business days.
Hi, thank you for reporting this issue. We're aware of this kind of issues and we're working on a fix. No ETA as of right now though. In the meantime, could you try to use a Custom widget, instead of a Custom HTML widget? Sorry for the inconvenience.