Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Scheme Registration?
Hi Wil,

We are using a custom protocol handler in our application and are currently greeted by the security/safety dialog asking the user to allow use of our custom protocol / scheme. Microsoft added support to register custom scheme into the WebView2 control and I'd like to know whether you are going to expose that functionality in AntView already or in a future version?

This is related to the protocol_handler approach for PWA manifests.

For reference, please see WebView2 Feedback github: #1825 with last comment " Fixed in runtimes 110.0.1531.0+ "

I'm using AntView 1.1.270 with "Last Version" of WebView2 runtime 111.0.1661.62

If the user ticks the checkbox WebView2 runtime adds an entry for the custom scheme to the Preferences file:
    "protocol_handler": {
        "allowed_origin_protocol_pairs": {
            "file://": {
                "customscheme": true

I've seen that there would be a workaround using On[Frame]NavigationStarting() as mentioned here WebView2 Feedback github: #384 - however I'm not too keen to implement this. Or perhaps more likely to say that the pain is not high enough to take that approach. Big Grin
Thanks in advance and best regards, Jochen

"The only frontiers are in your mind."
Hi Jochen,

The API that AntView 1.1.270 is building against is 110.0.1108.44.
It won't come in AntView 1.1.x, but I have opened a ticket for AntView 1.2.x to look into adding this.

AntView 1.2.x is building against API 111.0.1661.34 and that is what I've been working on as it is time to switch over to the latest API.

Note that the virtualhosttofoldermapping functionality that Champnic talks about in github #1825 is exposed as SetVirtualHostNameToFolderMapping.
If it is the file handler that you need than that is very likely the easiest way to use this technique instead of using custom protocol handlers.

It basically makes your files on the file system behave as if they are served by a webserver with a custom URL. It is a pretty cool concept that opens a lot of possibilities.
For your "website" you can control CORS behavior and also serve the files over https even while there is no actual certificate.

Hope this helps,
Hi Wil,

Thanks for the update. Kind of as expected.
I've seen that you're quite busy these days. Still daring to ask whether you have a rough ETA of AntView 1.2.x?

As for the suggested virtual host mapping. That's not cutting for us as we are using a custom protocol (scheme) handler, like ie. "tel:", "mailto:" or "skype:" in our application and some customer-accessible websites. The URL then triggers the launch of our application based on the protocol. It's not like we are using a custom domain in combination with http(s):// or file:// protocol. Hence I gave the reference to the On[Frame]NavigationStarting() events which would allow us to intercept the request.

Also as mentioned, it's bearable without the feature for the moment. However it would be pleasant to have it available soon.
Thanks in advance and best regards, Jochen

"The only frontiers are in your mind."

Always busy Smile 
Giving a timeline tends to be problematic as it isn't always clear how much work something is. It's just too often that you don't make the timeline and that's frustrating for all parties involved. I'd say weeks, but it might be 2 months if not everything goes as expected.

Note also that the scheme/protocol handler probably won't make it in the initial 1.2 release. However,  having said that.. once we're on version 1.2 the feature at least can be added whereas right now, it is impossible. On top of that, features that are requested by customers do get priority and we do tend to give early access to those features.
Think of a private release before all documentation is finished etc...


Forum Jump:

Users browsing this thread: 1 Guest(s)