Can you open a web browser restricted to localhost access only?

I want to open a web browser (firefox / chromium) to access a web app running on localhost. I need all other network access disabled. For example, if I run wireshark, I should see no external requests to public search engines, dns resolvers, or telemetry endpoints from the web browser. Is this possible using tools within the browser or flags on the command line?