Forum Discussion
Custom Visual - Can't open IDBFactory
- 3 years ago
Hi ThibaudGD,
From the looks of things, this requires access to the browser data storage APIs. As the custom visual iframe sandbox does not have the allow-same-origin attribute set, I don't think this will not be possible to achieve. If you want definitive confirmation you may need to contact the custom visuals team for clarification - [email protected].
Regards,
Daniel
Hi dm-p,
thank you for the answer. I just email them to have confirmation.
In the meantime, do you know if there is any workaround to this ?
If you want to use something that is not permitted by the sandbox, I would say it's not directly possible to work around. I don't know the IDBFactory APIs but if it's possible to access something similar from a remote endpoint that doesn't have CORS restrictions (again, a limitation of the allow-same-origin not being set by Power BI), then that might work. MS will not apply allow-same-origin to the sandbox as it effectively removes permissions from the sandbox, which creates all kind sof potential issues with custom visuals (even if your intentions are honourable).
The only storage a visual has (unless you can get it submitted to AppSource, certified and whitelisted to use the custom visuals local storage API) is the visual properties.