- The Environment: Scripts in the Browser
- The Browser API
- The Document Object Model
The Browser API
A scripting language provides the capability to process datato store data in variables, to execute calculations and transformations on this data, and to combine all these into purpose-built functions. However, a full-featured Web application requires more: the capability to manipulate the elements of the browser and of the document themselves.
Scripts interact with the browser and the document through application programming interfaces (APIs). An API is a set of methods and data types that expose the resources of an application to programmatic manipulation.
Historically, the initial support for client-side scripting was through the browser API, which exposed many browser resources to Web developers for the first time, enabling them to manipulate the browser and many of its components. Using the browser API, client-side scripts could offer features such as access to the browser history and bookmarks, programmatic navigation, animation, and event handling.