On Thu, 8 May 2025 10:33:39 -0700 (PDT) John P wrote:
JP> Hello wx-users,
JP>
JP> I am currently working with wxWebview using the Chromium backend. I noticed
JP> in the documentation that StartRequest is not available for Chromium. When
JP> looking at the source code, I noticed there is some overlap in
JP> SchemeHandler::ProcessRequest
JP> <
https://github.com/wxWidgets/wxWidgets/blob/71654b3eb3f186f8789a4fdb47c433a9d5a6a060/src/common/webview_chromium.cpp#L1893> and
JP> the base implementation of wxWebViewHandler::StartRequest
JP> <
https://github.com/wxWidgets/wxWidgets/blob/71654b3eb3f186f8789a4fdb47c433a9d5a6a060/src/common/webview.cpp#L185>.
JP> In both methods, the handler routes to GetFile() and processes the result.
JP>
JP> Would it be preferable to have SchemeHandler::ProcessRequest instead pass
JP> through StartRequest, which would give a developer the ability to override
JP> this method in wxWebViewHandler? This would allow Chromium backends to
JP> access request headers and post data.
Yes, it looks like this should be possible -- and it would definitely be
useful.
JP> Looking at the implementation for wxWebviewEdge, I understand this is not a
JP> trivial change. I would be willing to implement this myself and open a PR,
JP> but I wanted to get some feedback from the maintainers or anyone else who
JP> has looked into this.
No, I don't think anybody did. I've worked on the CEF backend relatively
recently but I concentrated on the functionality that was needed by the
application I was working on, and this was outside of it.
But, again, after a quick look it seems that this should indeed be done
and any PRs doing it would be welcome!
TIA,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/