You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DevTools has a so called flat mode where you specify a sessionId to apply commands to. I would like to specify a session id in CoreWebView2.CallDevToolsProtocolMethodAsync.
The scenario/use case where you would use this feature
I am using webview to display a pdf. I would like to programatically jump to a specific page, when certain events happen within my application. There is no visible api for that. However, using the inspector, I found that calling window.viewer.currentController_.goToPage should do the trick, provided I can inject javascript code into the context of the pdf viewer, which is hidden inside an embed, seemingly not accessible from the context of the main page.
If I call Target.getTargets I can find a target that seems to correspond to the insides of the embed. So I need to call Runtime.evaluate on the session id of this target.
How important is this request to you?
Critical. My app's basic functions wouldn't work without it.
Suggested implementation
According to https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md, in order to use flat mode, you just need to add the session id as the first member in the toplevel object : await SEND(ws, { sessionId, id: 1, // Note that IDs are independent between sessions. method: 'Page.navigate', params: { url: 'https://pptr.dev', }, });
I suppose it wouldn't be difficult to have an overload of CallDevToolsProtocolMethodAsync accepting a session id argument.
What does your app do? Is there a pending deadline for this request?
My app is displaying a pdf manual, and jumping to the relevant part of it based on what the user is doing. So far I was using an older pdf viewer control (foxit), but I want to upgrade from .net framework to .net, and there does not appear to be a .net version of the foxit display library (it seems to be retired; they are now only selling libraries to read and write pdfs). I can't upgrade to .net until I find a replacement viewer.
The text was updated successfully, but these errors were encountered:
Describe the feature/enhancement you need
DevTools has a so called flat mode where you specify a sessionId to apply commands to. I would like to specify a session id in CoreWebView2.CallDevToolsProtocolMethodAsync.
The scenario/use case where you would use this feature
I am using webview to display a pdf. I would like to programatically jump to a specific page, when certain events happen within my application. There is no visible api for that. However, using the inspector, I found that calling window.viewer.currentController_.goToPage should do the trick, provided I can inject javascript code into the context of the pdf viewer, which is hidden inside an embed, seemingly not accessible from the context of the main page.
If I call Target.getTargets I can find a target that seems to correspond to the insides of the embed. So I need to call Runtime.evaluate on the session id of this target.
How important is this request to you?
Critical. My app's basic functions wouldn't work without it.
Suggested implementation
According to https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md, in order to use flat mode, you just need to add the session id as the first member in the toplevel object :
await SEND(ws, { sessionId, id: 1, // Note that IDs are independent between sessions. method: 'Page.navigate', params: { url: 'https://pptr.dev', }, });
I suppose it wouldn't be difficult to have an overload of CallDevToolsProtocolMethodAsync accepting a session id argument.
What does your app do? Is there a pending deadline for this request?
My app is displaying a pdf manual, and jumping to the relevant part of it based on what the user is doing. So far I was using an older pdf viewer control (foxit), but I want to upgrade from .net framework to .net, and there does not appear to be a .net version of the foxit display library (it seems to be retired; they are now only selling libraries to read and write pdfs). I can't upgrade to .net until I find a replacement viewer.
The text was updated successfully, but these errors were encountered: