The Iterfaces (object types) which help us interact with the browser window are known as Browser objects. Browser object is not an official term but its a group of objects which belongs to different WebAPIs but are used for managing various browser related information and actions.
For example, when an HTML document is opened in a browser window, the browser interprets the document as a collection of hierarchical objects(HTML tags) and accordingly displays the data contained in these objects(HTML page rendering). The browser parses the document and creates a collection of objects, which defines the documents and its details. We have shown the various objects that can be used to access various components of the browser window in the picture below:
The browser objects are of various types, used for interacting with the browser and belongs to different APIs. The collection of these Browser objects is also known as Browser object Model(BOM).
The default object of browser is Window which means you can call its functions directly.
The objects listed below are called browser objects.
Window - part of DOM API
Document - part of DOM API
Screen - property of Window object
History - property of Window object
Location - property of Window and Document object
It is used to interact with the browser window which displays the web page. It generally represents a tab in browser, but some actions like window width and height will affect the complete browser window.
It acts as a storehouse of all the data and information about the Browser software used to access the webpage and this object is used to fetch information related to the browser for example, whether the user is using Chrome browser or Safari browser, which version of browser is being used etc.
This object represent the HTML document that is loaded into the browser. A document object is an object that provides access to all HTML elements of a document(webpage). We can use this object to append a new HTML tag to the webpage, modify any exsiting HTML tag, etc.
It is a built-in object which is used to fetch information related to the browser screen, like the screen size, etc. It is also obtained from the Window object.
Location is a built-in object which represent the location of the object to which it is linked, which can be Window or Document. Both the Document and Window interface have a linked location property.
From the next tutorial, we will cover all these objects, one by one, in detail, with examples to see how we can use them to interact with browser and perform various different actions.