term "JavaScript"

Source: Internet
Author: User

The generic term "JavaScript", which is understood in the context of a Web browser, contains several very different elements.

One is the core language (ECMAScript) and the other is a collection of Web APIs, including the DOM (Document Object model)

JavaScript, the core language (ECMAScript)

The core language of JavaScript is standardized by the ECMA TC39 Committee as the ECMAScript language.

This core language is also used in non-browser environments, such as node. js.

ECMAScript defines:

    • Language syntax (parsing rules, keywords, control flow, object literal initialization ...) )
    • Error handling mechanism (throw, try/catch, ability to create user-defined error types)
    • Type (boolean, number, string, function, object, ...) )
    • The global object: In the browser, this is a Window object, but ECMAScript only defines browser-specific APIs, such as parseint, parsefloat, decodeURI, encodeURI ...
    • The inheritance mechanism based on prototype
    • Built-in objects and functions (JSON, Math, Array.prototype method, object introspection method, etc.)
    • Strict mode

The ECMAScript internationalization API specification is a supplement to the ECMAScript language specification.

The internationalization API provides a collation (string comparison), number format, and date and time format for JavaScript applications, allowing the application to select languages and customize features as needed.

DOM Apiswebidl

The WEBIDL specification provides the glue between DOM technology and ECMAScript.

The core of the DOM

The Document Object Model (DOM) is a cross-platform, language-independent convention that represents and interacts with objects in html,xhtml and XML documents.

You can address and manipulate objects in the DOM tree by using methods on the object.

The Consortium standardizes the core Document Object model, which defines the language-independent interface that abstracts HTML and XML documents into objects, and defines the mechanism for manipulating this abstraction.

HTML DOM

HTML is the markup language of the web and is specified by the DOM. Layered on top of the abstract concepts defined in DOM Core, HTML also defines the meaning of the element. The HTML DOM includes classname attributes, such as HTML elements, or APIs such as Document.body.

The HTML specification also defines limitations on the document; For example, it requires all the child elements of the UL element that represent unordered lists to be Li elements because they represent list items. Typically, it also prohibits the use of elements and attributes that are not defined in the standard.

Other notable APIs
    • The settimeout and SetInterval functions are first specified on the HTML standard Window interface.
    • XMLHttpRequest makes it possible to send an asynchronous HTTP request.
    • The CSS object Model abstracts CSS rules as objects.
    • webworkers allows parallel computations.
    • WebSockets allows low-level bidirectional communication.
    • Canvas 2D Context is the drawing API for <canvas>.

term "JavaScript"

Related Article

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.