Git Product home page Git Product logo

Comments (4)

salvadordf avatar salvadordf commented on May 13, 2024

COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_ALL includes COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_DOCUMENT and the WebView2 documentation states that it should include requests from the main page including dedicated workers and iframes.

I would try this to see if the URL is filtered :
WVBrowser1.AddWebResourceRequestedFilterWithRequestSourceKinds('*', COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL, COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_ALL);

If the browser doesn't filter the URL you need with the last code I would report this to the WebView2 project :
https://github.com/MicrosoftEdge/WebView2Feedback/issues

from webview4delphi.

salvadordf avatar salvadordf commented on May 13, 2024

I forgot the asterisk in the AddWebResourceRequestedFilterWithRequestSourceKinds call.
You can test this in the MiniBrowser demo.

from webview4delphi.

mytvdat avatar mytvdat commented on May 13, 2024

COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_ALL includes COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_DOCUMENT and the WebView2 documentation states that it should include requests from the main page including dedicated workers and iframes.

I would try this to see if the URL is filtered : WVBrowser1.AddWebResourceRequestedFilterWithRequestSourceKinds('*', COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL, COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_ALL);

If the browser doesn't filter the URL you need with the last code I would report this to the WebView2 project : https://github.com/MicrosoftEdge/WebView2Feedback/issues

WebResourceRequested event can not get the url if this url open in an iframe.
try Network.Enable and Network.requestWillBeSent, can't get the url too.
uses CEF4delphi,Can it get all links in iFrame?

from webview4delphi.

salvadordf avatar salvadordf commented on May 13, 2024

Unless there's a WebView2 issue, the previous code should work. If not, please create an issue in the WebView2Feedback repository because this seems to be an upstream issue.

Please, use our forum for more questions.

from webview4delphi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.