JavaScript consists of three main parts:
1. The core of Ecmascript:javascript is simply a description that defines all the properties, methods, and objects of the scripting language.
Specifically, ECMAScript describes the following: syntax, type, statement, keyword, reserved word, operator, object
Each browser has its own implementation of the ECMAScript interface, which is then expanded to include both the DOM and the BOM.
2. DOM:
The DOM (Document Object model) is an application interface (API) for HTML and XML. The DOM will plan the entire page into a document composed of node hierarchies. Each part of an HTML or XML page is a derivative of a node.
The DOM creates a tree to represent the document, giving developers unprecedented control over the content and structure of the document. The DOM API makes it easy to delete, add, and replace nodes.
3. BOM
You can access and manipulate the browser window, using the BOM, the developer can move the window, change the text in the status bar, and perform other actions that are not directly related to the content of the page.
Because there is no relevant BOM standard, each browser has its own BOM implementation. There are some de facto criteria, such as having a Window object and a navigation object, but each browser can define its own properties and methods for those objects or other objects.
- Window Object
- Navigator Object
- Screen Object
- History Object
- Location Object
JavaScript composition (three components)