- The Core, implemented according to the ECMA-262 standard.
- This covers syntax, data types, objects, inheritance and so on.
- Document Object Model (DOM)
- This allows you to access and modify your HTML
- Browser Object Model (BOM)
- Everything outside the context of your page (windows & frames, history, sound…)
EcmA-262 and Ecmascript
ECMAScript defines how you write the language. It defines its syntax and how the data types work. Furthermore, it defines what happens when you add a number to a string and also describes the behavior when you parse a string into a number. It defines objects, prototypes and inheritance and much much more…
ECMA-262 also evolved and has different edition’s. Currently, most browsers support edition 5, while edition 6 is only supported by the most recent versions of the major browsers.
Document Object Model (DOM)
The DOM API provides methods and functions for finding elements in your HTML and then manipulating or deleting them. You can also create new elements from scratch.
W3C standardized the BOM and has levels instead of editions. Currently all the major browsers support DOM Level 3.
Some examples of the DOM API in action
Historically, the DOM is used for input validation and the next thing that comes to mind are calendar widgets, advertizing and drop-down menu’s (although the last one can be done by CSS too).
With the arrival of HTML5 and the canvas element, you can make huge interactive games with it, it even rivals flash games.
Browser Object MODEL (BOM)
The BOM API gives you access to some browser related functionality. For example, create new windows and frames, change the size of the browser and create custom back and forward buttons.
The arival of HTML5 standardized the BOM. Before it that, it was pure chaos. There is still some browser specific functionality, but this mostly relates to the ActiveXObject of IE and mobile features for smartphones.