Replies: 1 comment 2 replies
-
You can try using the Chrome DevTools protocol. https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage/ |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a local webapp running in the CefSharp view which sometimes loads an external webapp from the server.
When detecting the address change to load the external app, I'm using
ExecuteScriptAsync
to add some items tolocalStorage
andsessionStorage
.This worked fine with ancient CefSharp 85, after upgrading to version 103 it does not work anymore.
Looking at developer tools, the data has not been added to the storages and the script is found anonymously under "(no domain)" instead of the target domain.
Has anything changed here? What can I do so my webapp will find the data in localStorage and sessionStorage again?
Update:
It seems when I just execute the script from the address change or
FrameLoadStart
event the storages aren't yet bound to the target domain and therefore not found by the js application.If I use
webView.WebBrowser.ExecuteScriptAsyncWhenPageLoaded(scriptData)
, the storage is filled late and the js app already tried to read data and didn't find it.Any idea how I can prefill
localStorage
andsessionStorage
so the js app finds the data on startup?Beta Was this translation helpful? Give feedback.
All reactions