The core language is what is known as ECMA Script or European Computer Manufacturers Association Script. Pretty Nasty name eh? Well, don’t fret, this is why we call it ECMA Script. At a very basic level, ECMA Script describes the following parts of the language:
- Reserved words
DOM (Document Object Model)
The DOM represents an entire page as a hierarchy of nodes. Each part of an HTML or XML page is a type of a node containing different kinds of data. Take a look at this HTML code and see how DOM represents it
DOM tree structure of above code
By creating a tree to represent a document, the DOM allows developers an unprecedented level of control over its content and structure. Nodes can be removed, added, replaced, and modifi ed easily by using the DOM API. The whole idea is “Modify The Page Without Reloading”
BOM (Browser Object Model)
BOM allowed access and manipulation of the browser window.
- The capability to pop up new browser windows
- The capability to move, resize, and close browser windows
- The navigator object, which provides detailed information about the browserThe location object, which gives detailed information about the page loaded in the browser
- The screen object, which gives detailed information about the user’s screen resolution
- Support for cookies
- Custom objects such as XMLHttpRequest and Internet Explorer’s ActiveXObject
Again if most of these features or terms seem vague, don’t sweat. We’ll take 1 step at a time to master all this.
So, where are we headed with all this?
- ECMAScript, which is defi ned in ECMA-262 and provides the core functionality
- The Document Object Model (DOM), which provides methods and interfaces for working with the content of a web page
- The Browser Object Model (BOM), which provides methods and interfaces for interacting with the browser