We utilize cookies/SessionStorage to retain certain filter settings within our HTML view. However, an error arises during usage:
Uncaught DOMException: Failed to read the ‘cookie’ property from ‘Document’: The document is sandboxed and lacks the ‘allow-same-origin’ flag.
It appears that we’re unable to modify or access this due to restrictions. Is there a method to enable this functionality?
It has a realy easy fix, but i think you guys have some security concerns
Hi Tim,
You are correct that this is because of security reasons. Currently we allow-scripts
on the WebView iframe, but we don’t allow-same-origin
since that could open up the possibility of accessing (among other things) login data if the page rendered in the WebView ends up being on the same origin as the environment.
Do you mind sharing what kind of data you are trying to filter? Is it a custom page built specifically for your app or a view we don’t support yet?
Tom
The session token right? and access token in the local storage. (You can extualy always excess them using devtools)
I have created a table view that is build in python from a data frame. It hase the capebilities to order and sort data. also you can add hovers or validation whit colors on your cells for a quiq overview. you can also have multiple headers.
For specific filtering (the way you can filter per column and whit multiple filter type options). I want to save the options they have selected. So if they need to reload the page with new calulations they dont have to apply them all over again. I try to do this by utilising cookies or session_storage. becouse else it will be recet.
we use it on all our apps with a table output
Hey Tim,
I really like your implementation! The WebView is quite generic and sandboxed by design, since we have to support many use-cases and don’t control what is rendered (or executed) in it, so you are bound to reach its limits when developing more complex functionality. Persisting state is very difficult, as you are experiencing, either due to the security restrictions or the fact that it reloads each change.
Thanks for sharing your screenshots. They really make a strong case for us to add a TableView, so you don’t have to code this all on your own. I’ll pass this on to the product team to consider
Tom
1 Like
We are now planning to add a dedicated TableView
to the SDK, which probably will ship with builtin filters and can persist them. You can checkout the progress here: Add TableView