One could think of a browser as a bunch of mini-applications bundled together. There is one which is responsible for the networking, one for the javascript, one for the painting the layout, one for storage, one for user-preferences, etc. Theoretically each component could be built in a different language. It's like how a website can be made with a combination of java, node, mysql, etc.