HTML and CSS Reference
In-Depth Information
it in some form or other; it's on phones and other mobile devices; it's used to de-
velop extensions for browsers such as Mozilla Firefox and Google Chrome and has
even taken the front seat in Gnome Shell, the defining technology in the Gnome 3
desktop environment for Linux. JavaScript runtimes are wild beasts. When deploy-
ing a script on the web, we can never know what kind of runtime will attempt to
run our code. Couple this with the huge amount of JavaScript already deployed on
the web, and you will have no problem imagining why backwards compatibility has
been a key concern for ES5. The goal is not to “break the web,” but rather bring it
ES5 has worked hard to standardize, or codify , existing de facto standards—
innovation in the wild adopted across browser vendors as well as common use
cases found in modern JavaScript libraries. String.prototype.trim and
Function.prototype.bind are good examples of the latter, whereas attribute
getters and setters are good examples of the former.
Additionally, ES5 introduces strict mode , which points out the way moving
forward. Strict mode can be enabled with a simple string literal, and makes ES5
compliant implementations, well, stricter in their parsing and execution of scripts.
Strict mode sheds some of JavaScript's bad parts and is intended to serve as the
starting point for future updates to the language.
The reason this section is entitled the close future of JavaScript is that there
is reason to believe that we won't have to wait another 10 years for good browser
support. This is of course speculation on my (and others) part, but as ES5 cod-
ifies some de facto standards, some of these features are already available in
a good selection of browsers today. Additionally, the last couple of years have
seen a somewhat revitalized “browser war,” in which vendors compete harder
than in a long time in creating modern standards compliant and performant
Microsoft and their Internet Explorer browser have slowed down web devel-
opers for many years, but recent development seems to suggest that they're at least
back in the game trying to stay current. Besides, browser usage looks vastly different
today compared with only 5 years ago, and fair competition regulations are already
forcing Windows users in Europe to make a conscious choice of browser.
All in all, I am fairly positive to the adoption of ES5. Some of it is already
supported in browsers like Chrome, Firefox, and Safari, and preview releases of all
the aforementioned browsers adds more. At the time of writing, even previews of
Internet Explorer 9 already implement most of ES5. I expect the situation to look
even brighter once this topic hits the shelves.
Search WWH ::

Custom Search