-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebResourceRequested only fires for http/https URLs #73
Comments
That makes sense. We have a backlog feature for something like custom protocol handlers although perhaps it makes just as much sense to reuse WebResourceRequested for that. |
+1 on this too: I'm trying to implement an oauth (e.g. log in with google) dialog, which needs a predefined URL to navigate back to complete the flow, and I was hoping this could be |
We've made some changes in this area to allow WebResourceRequested for more types. Can you give it a try with the latest SDK/Edge Dev and see if it solves your scenario? If it doesn't, please reopen this issue with what's missing. Thanks! |
We're also planning on adding better custom url support, tracked in #172. |
Thanks everyone for the feedback, we are starting to look into custom URI schemes again. Would this provide the support you are looking for, for custom URI schemes? If this event/handler was provided would you still need WebResourceRequested to fire for custom URI schemes? Thanks. |
I don't see how I would serve a response to that event, for one? |
Yeah, I'd have the same problem. It's OK for triggering an action by navigating the WebView to a custom URL scheme, but I'd also like to be able to serve responses with headers and streams to custom URL schemes. The example of an MHTML |
Also would like to generate responses. And at that point, strange issues with CSP and CORS can occur as well. For the no mixed content rule, should the custom protocol be treated as secure or insecure? For CORS, does the custom protocol get correctly supported in (The later is a bug we're seeing with Webkit2, which effectively breaks all external asset loading unless they respond with |
@Beanow for our uses, we would expect |
For our lower level library, being configurable would be great. |
Thanks everyone for the feedback, we are planning support for adding an event and handler for unsupported URI schemes as well as having WebResourceRequested fire for unsupported URI schemes. Does having WebResourceRequested fulfill the remaining needs? We are currently investigating the CORS scenario but are hoping to get feedback about this first. |
Hi folks! As @maurawinstanley mentioned we're currently working on custom protocol and it will looks similar to EdgeHTML's equivalent feature where you get an event when webview2 encounters an unrecognized protocol, and you can handle the event as appropriate. There area few things that planned to be exposed in the event handler -
Would love some feedback on whether approach solves your scenario and whether these info is enough or developers would want access to additional information/parameter as well in the event handler. |
I'm confused on the intended use case - it sounds like most people here want to be able to serve responses, which presumably would be handled by WebResourceRequested (hence the title), and other url-only custom protocol work makes sense for browser -> app redirections, but that's handled by the OS. Why would you want someone to implement this protocol event rather than WebResourceRequested? What's the difference? |
I'd like to implement an MHTML renderer using "content ID" (
cid:xxxx
) URLs. I need to hook the requests for those URLs and return the contents of the other MIME parts from the HTML portion. I'd also like to hook the request for the HTML using anIStream
sinceNavigateToString
requires loading the entire HTML document into memory and there doesn't seem to be a way to change the source URL for the top-level frame.AB#27258414
The text was updated successfully, but these errors were encountered: