5

In an ordinary Blazor WebAssembly web page, is there any way to run a web view on the page? That is, to effectively have a "inner" browser on my page within my actual Browser, whether it's WebView2 or something else?

If there is no Blazor-specific way to do this, is there a non-Blazor (Javascript or otherwise) way?

I realize this is a strange thing to do, but I'd like to experiment with showing pages from other sites where an iframe won't work due to the frame-ancestors 'self' policy. I'm sure this is generally discouraged and a bad practice, but like I said, these are just experiments and for learning.

Note I'm not asking about a mobile, WPF, MAUI, or any other native app, just the use case of having a browser on an actual web page.

Patrick Szalapski
  • 8,738
  • 11
  • 67
  • 129

1 Answers1

1

I'd like to experiment with showing pages from other sites where an iframe won't work due to the frame-ancestors 'self' policy

Unfortunately, no there is not a way to do what you are asking as you have a requirement that it must work in a normal browser with websites that prevent exactly what you are asking for. It would be a failure in browser security if it was possible.

LoneSpawn
  • 988
  • 1
  • 8
  • 8