MicrosoftEdge / WebView2Samples

Microsoft Edge WebView2 samples
830 stars 460 forks source link

Only statically references web files and resources available when I inspect from the webview2 #175

Closed nsandeep87 closed 1 year ago

nsandeep87 commented 1 year ago

I am using the below project webview2_sample_uwp https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp

Inside this project, I am looking at the new window section. Please see the attached newWindow.png. I see that we are rendering the contents present in the HTML folder. The HTML folder consists of (_add_host_object.html,always-up-to-date.svg ,best-of-the-web,execute_javascript.html,new_window.html, popups_anddialogs.html, power-of-native.svg, style.css, webview-hero.svg)

But when I run the app and inspect the new window, I do not see all the files. Only statically referenced files are visible. Please the screenshot below(sources.png). In my project, I have files that are loaded dynamically, and json files that are accessed at run time. How do we copy these file so that it avaialble for me at runtime newWindow sources

nsandeep87 commented 1 year ago

I can access the media files if the Build Action type is content. Ccosing it for now