JavaScript is a scripting language. In the context of a web browser, scripting usually refers to program code written in JavaScript that is executed by the browser when a page is downloaded, or in response to an event triggered by the user. 1
A Web API is an API for either a web server or web browser. There’s a lot we can do inside a browser: animate graphics, send messages, edit photos, edit files etc. and to do all that we can utilize the browser’s API, aka the Web API. Web API is usually consistent across browsers, and documented by W3C. JavaScript shims can be used to cover inconsistencies across browsers.
HTML5: Audio, Video, Canvas, Geolocation, Storage
With the web API, you can
An API is an Application Programming INTERFACE.
The most basic scripting interface developed at W3C is the DOM, the Document Object Model which allows programs and scripts to dynamically access and update the content, structure and style of documents.
Modifications of the content using the DOM by the user and by scripts trigger events that developers can make use of to build rich user interfaces.
Simply put, an interface is a type of object, that you’re able to use in your web app or site. Node, Element, Document, Navigator, Storage, Event are all interface objects.
All objects implementing the same interface can be treated similarly. For example
Node
is an interface that is implemented by multiple other objects, includingDocument
andElement
. All objects implementing theNode
interface can be treated similarly. The term node therefore (in the DOM context) means any object that implements theNode
interface. Most commonly that is an element object representing a HTML element.