Despite all these features, client-side JavaScript is not quite a
general-purpose language. Its capabilities are severely restricted
to prevent attacks on the browser user through Web pages
containing JavaScript code. It can accept input from the user and
generate or modify Web pages, but it cannot directly alter the
contents of disk files and cannot open its own network
connections.
Over time, the JavaScript language has become more general and
less bound to its client-side environment. This is something that can
be expected to happen to any successful specialized language as its
possibilities unfold in the minds of developers and users. Client
JavaScript now interacts with its environment by reading and writing
values in a single special object called the browser DOM (Document
Object Model). The language still has some legacy APIs to the browser
that don't go through the DOM, but these are deprecated, not present
in the ECMA-262 standard for JavaScript, and may not be supported in
future versions.