ECMAScriptdoesn’t have ties to any browser in particular and, actually,has no methods for user input or output to speak of.(It is not unlike languages such as C,which rely on external libraries to accomplish such tasks.) So what is ECMAScript?
“ECMAScript can provide core scripting capabilities for a variety of host environments,and therefore the core scripting language is specified...apart from any particular host environment.”
AWeb browser is considered a host environment for ECMAScript,but it is not the only host environment.Indeed,numerous other environments (such as Nombas’s ScriptEase and Macromedia’s ActionScript, used in both Flash and Director MX) can host ECMAScript implementations.So what does ECMAScript specify outside of a browser? To put it simply,ECMAScript describes the following:
Each browser has its own implementation of the ECMAScript interface, which is then extended to contain the DOM and BOM There are other languages that also implement and extend ECMAScript such as Windows Scripting Host (WSH), ActionScript in Macromedia Flash and Director,and Nombas ScriptEase.
The second edition of ECMA-262 was largely editorial in nature.The standard was updated in order to get into strict agreement with ISO/IEC-16262 and didn’t feature any additions,changes,or omissions.ECMAScript implementations typically don’t use the second edition as a measure of conformance.
The third edition of ECMA-262 was the first real update to the standard. It provides updates to string handling,the definition of errors, and numeric outputs.It also adds support for regular expressions, new control statements, try...catch exception handling,and small changes to better prepare the standard for internationalization. To many, this marked the arrival of ECMAScript as a true programming language.
What does ECMAScript conformance mean?
In ECMA-262, the definition of ECMAScript conformance is laid out. A scripting language must subscribe to four basic tenets:
All implementations of ECMAScript must be in agreement with these criteria.
ECMAScript support in Web browsers
Today, all popular Web browsers comply with the third edition of ECMA-262. The following table lists ECMAScript support in the most popular Wed browsers:
The Document Object Model (DOM)
The Document Object Model (DOM) is an application programming interface (API) for HTML as well as XML. The DOM maps out an entire page as a document composed of a hierarchy of nodes. Each part of an HTML or XML page is a derivative of a node. Consider the following HTML page:
This code can be diagrammed into a hierarchy of nodes using the DOM .
By creating a tree to represent a document, the DOM allows developers an unprecedented level of control over its content and structure. Nodes can easily be removed, added, and replaced by using the DOM API.
Why the DOM is necessary
With Internet Explorer 4.0 and Netscape Navigator 4.0 each supporting different forms of Dynamic HTML (DHTML),developers for the first time could alter the appearance and content of a Web page without reloading it.This represented a tremendous step forward in Web technology,but also a huge problem.Netscape and Microsoft each went its own way in developing DHTML,thus ending the period when Web developers could write a single HTML page that could be accessed by any Web browser.
It wasdecided that something had to be done to preserve the cross-platform nature of the Web.The fear was that,if someone didn’t rein in Netscape and Microsoft,the Web would develop into two distinct factions that were exclusive to targeted browsers.It was then that the World Wide Web Consortium (W3C),the body charged with creating standards for Web communication,began working on the DOM.
DOM Level 1 became a W3C recommendation in October of 1998.It consisted of two modules:the DOM Core,which provided a way to map the structure of an XML-based document to allow for easy access to and manipulation of any part of a document, and the DOM HTML,which extended the DOM Core by adding HTML-specific objects and methods.
Whereas DOM Level 1’s only goal was to map out the structure of a document,DOM Level 2’s aims were much broader. This extension to the original DOM added support for mouse and user interface events (long supported by DHTML),ranges, traversals (methods to iterate over a DOM document),and support for Cascading Style Sheets (CSS) through object interfaces.The original DOM Core introduced in Level 1 was also extended to include support for XML namespaces.
DOM Level 2 introduced several new modules of the DOM to deal with new types of interfaces:
Aside from the DOM Core and DOM HTML interfaces,several other languages have had their own DOM standards published.The languages are XML-based and each DOM adds methods and interfaces unique to that language:
Additionally,other languages have developed their own DOM implementations,such as Mozilla’s XML User Interface Language (XUL).However,only the languages in the preceding list are standard recommendations from W3C.
DOM support in Web browsers
The DOM was already a standard for some time before Web browsers started implementing it.Internet Explorer took first stab in version 5.0,but it actually didn’t have any realistic DOM support until version 5.5, when it implemented most of DOM Level 1.Internet Explorer hasn’t introduced new DOM functionality since that time.
For Netscape,no DOM support existed until Netscape 6 (Mozilla 0.6.0) was introduced.To date, Mozilla has the best support for the DOM, implementing all of Level 1,nearly all of Level 2, and some parts of Level 3.(The goal of the Mozilla development team was to build a 100% standards-compliant browser,and their work paid off.)
Latecomers such as Opera,which didn’t add DOM support until version 7.0,and Safari, which has implemented most of DOM Level 1,are mostly on par with Internet Explorer 5.5; and in some cases,they exceed it.However,all the browsers are still a distant second to Mozilla as far as DOM support goes.The following fidure shows DOM support for popular browsers:
The Browser Object Model (BOM)
Because no standards exist for the BOM, each browser has its own implementation.There are some defacto standards,such as having a window object and a navigator object,but each browser defines its ownproperties and methods for these and other objects.
Java Script Related Tutorials
|Adv Java Tutorial||Core Java Tutorial|
|Java-Springs Tutorial||Java Servlets Tutorial|
|EJB(Enterprise JavaBeans) Tutorial||JavaServer Faces (JSF) Tutorial|
|Java Swing Tutorial||Java Tutorial|
|JavaMail API Tutorial||Java 8 Tutorial|
|Java XML Tutorial||Java Bean Utils Tutorial|
|The Java Debugger (JDB) Tutorial||Java.math Package Tutorial|
Java Script Related Interview Questions
|Java Script Interview Questions||Adv Java Interview Questions|
|Core Java Interview Questions||Java-Springs Interview Questions|
|Java Servlets Interview Questions||EJB(Enterprise JavaBeans) Interview Questions|
|JavaServer Faces (JSF) Interview Questions||Java Swing Interview Questions|
|Java 8 Interview Questions||Java XML Interview Questions|
|JavaFX Interview Questions||The Java Debugger (JDB) Interview Questions|
Java Script Related Practice Tests
|Java Script Practice Tests||Adv Java Practice Tests|
|Core Java Practice Tests||Java-Springs Practice Tests|
|Java Servlets Practice Tests||EJB(Enterprise JavaBeans) Practice Tests|
|JavaServer Faces (JSF) Practice Tests||Java 8 Practice Tests|
Java Script Tutorial
Browser And Operating System Detection
All About Events
Advanced Dom Techniques
Forms And Data Integrity
Drag And Drop
Interacting With Plugins
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.