In the context of the browser, when a new window is launched, the global object is the window representation, an it has the property document, which is the root element of the DOM, and also defines some functions to query and modify the DOM. Examples of this are the well known getElementById function. All of these functionalities are known as the JavaScript Application Programing Interface (JSAPI) and each browser has different implementations, and some programs can implement its own when JavaScript is embedded in them. This also allows to attach event handlers to preform some tacks bases on the user interaction. Here is where JavaScript frameworks and libraries build an abstraction layer that avoids compatibility issues between different browsers and enhance it’s capabilities providing animation, ajax, data-binding, and all the goodness we see in modern web apps.

The next entry is about testing JavaScript code