JavaScript Learning: JavaScript implementation

Source: Internet
Author: User

While JavaScript and ECMAScript are often used to express the same meaning, JavaScript has far more meaning than ECMA-262.

A complete JavaScript implementation should consist of three different parts:

    1. Core (ECMAScript): A basic standard for scripting languages
    2. Document Object Model (DOM): Methods and interfaces for controlling page content and structure
    3. Browser object Model (BOM): Methods and interfaces for accessing and manipulating browsers

(1) ECMAScript

The ECMAScript defined by ECMA-262 has no dependencies on the Web browser. ECMA-262 defines only the basis of this language, and on this basis can build a more complete scripting language.

The JavaScript language core defines very few APIs for the operation of text, arrays, dates, and regular expressions, but these APIs do not include input and output capabilities.

Input and output functions (such as network, storage, and graphics-related complex features) are provided by the host environment (host enviroment) that the JavaScript belongs to.

Our common web browser is just one of the ECMAScript implementations possible, and the hosting environment not only provides a basic ECMAScript implementation, but also provides an extension of that language so that the interface between the language and the environment interacts. These extensions, such as DOM, use the core type and syntax of ECMAScript to provide more specific functionality to enable operations against the environment. Other hosting environments include node (a server-side JavaScript platform) and Adobe Flash.

The ECMA-26 standard stipulates the following parts:

    • Grammar
    • Type
    • Statement
    • Key words
    • Reserved words
    • Operator
    • Object

ECMAScript is a description of the language that implements the content of all aspects of the standard provision.

(2) Document Object Model (DOM)

The Document Object model (Dom,document object models) is an application programming interface (Api,application programming Interface) for XML but extended for HTML.

The DOM maps the entire page into a multi-tiered node structure. Each component of an HTML or XML page is a node of a certain type, and these nodes contain different types of data.

The World Wide Web Consortium, www Alliance, which is responsible for developing web communication standards, plans the DOM.

Note: Dom is not just for JavaScript, but many other languages implement DOM as well. However, in a Web browser, Dom-based implementations of ECMAScript have indeed become an important part of JavaScript's language.

(3) Browser object Model (BOM)

The Web browser supports a browser object model that can access and manipulate the browser window (bom,brower).

Developers use the BOM to control parts of the page that the browser displays.

Where the BOM is really different (and where it often causes problems), or it's part of the JavaScript implementation, but it doesn't have the relevant standards. This problem has been solved in HTML5, HTML5 is committed to writing many BOM functions into formal specifications.

JavaScript Learning: JavaScript implementation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.