Simulate a browser inside a javascript application

So I have an input where the user can type any url, and I want to render that webpage in my own javascript application. (render a website inside other website, basically)

An Iframe with a src is what I want to achieve, the problem is that some websites won’t let you do that due to X-Frame-Options = ‘deny’ | ‘sameorigin’

So I can fetch manually the url, receiving the HTML code, but the next problem is that the css won’t appear, because the requests for the css comes with my localhost domain.

Example:

  1. fetch(www.tailwindcss.com) 200 OK
  2. inside tailwindcss application there are script files which starts to download, one of them being the css, but the request comes out like localhost:8080/file.css instead www.tailwindcss.com/file.css

Is this even possible? Or am I stuck with Iframe?
Thanks